Skip to content

Commit

Permalink
chore: use dependency-groups
Browse files Browse the repository at this point in the history
Signed-off-by: Henry Schreiner <[email protected]>
  • Loading branch information
henryiii committed Oct 30, 2024
1 parent 66d45de commit 831a075
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 26 deletions.
24 changes: 13 additions & 11 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,11 @@ jobs:

- name: Install dependencies
run: |
uv pip install --system ".[test]"
uv sync
- name: Generate a sample project
run: |
python -m test.test_projects test.test_0_basic.basic_project sample_proj
uv run -m test.test_projects test.test_0_basic.basic_project sample_proj
- name: Run a sample build (GitHub Action)
uses: ./
Expand Down Expand Up @@ -124,7 +124,7 @@ jobs:

- name: Test cibuildwheel
run: |
python ./bin/run_tests.py --run-podman
uv run bin/run_tests.py --run-podman
emulated-archs:
name: Get qemu emulated architectures
Expand All @@ -137,12 +137,13 @@ jobs:
- uses: actions/setup-python@v5
with:
python-version: "3.x"
- uses: astral-sh/setup-uv@v3
- name: Install dependencies
run: python -m pip install ".[test]"
run: uv sync
- name: Get qemu emulated architectures
id: archs
run: |
OUTPUT=$(python -c "from json import dumps; from test.utils import EMULATED_ARCHS; print(dumps(EMULATED_ARCHS))")
OUTPUT=$(.venv/bin/python -c "from json import dumps; from test.utils import EMULATED_ARCHS; print(dumps(EMULATED_ARCHS))")
echo "${OUTPUT}"
echo "archs=${OUTPUT}" >> "$GITHUB_OUTPUT"
Expand All @@ -159,14 +160,15 @@ jobs:
- uses: actions/setup-python@v5
with:
python-version: "3.x"
- uses: astral-sh/setup-uv@v3
- name: Install dependencies
run: python -m pip install ".[test,uv]"
run: uv sync

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Run the emulation tests
run: pytest --run-emulation ${{ matrix.arch }} test/test_emulation.py
run: uv run pytest --run-emulation ${{ matrix.arch }} test/test_emulation.py

test-pyodide:
name: Test cibuildwheel building pyodide wheels
Expand All @@ -179,14 +181,14 @@ jobs:
name: Install Python 3.12
with:
python-version: '3.12'
- uses: astral-sh/setup-uv@v3

- name: Install dependencies
run: |
python -m pip install ".[test]"
run: uv sync

- name: Generate a sample project
run: |
python -m test.test_projects test.test_0_basic.basic_project sample_proj
uv run -m test.test_projects test.test_0_basic.basic_project sample_proj
- name: Run a sample build (GitHub Action)
uses: ./
Expand All @@ -198,6 +200,6 @@ jobs:

- name: Run tests with 'CIBW_PLATFORM' set to 'pyodide'
run: |
python ./bin/run_tests.py
uv run ./bin/run_tests.py
env:
CIBW_PLATFORM: pyodide
33 changes: 19 additions & 14 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,20 @@ dependencies = [
]

[project.optional-dependencies]
uv = ["uv"]

[project.scripts]
cibuildwheel = "cibuildwheel.__main__:main"

[project.entry-points."validate_pyproject.tool_schema"]
cibuildwheel = "cibuildwheel.schema:get_schema"

[project.urls]
Changelog = "https://github.com/pypa/cibuildwheel#changelog"
Documentation = "https://cibuildwheel.pypa.io"
Homepage = "https://github.com/pypa/cibuildwheel"

[dependency-groups]
bin = [
"click",
"packaging>=21.0",
Expand All @@ -60,9 +74,6 @@ bin = [
"requests",
"rich>=9.6",
]
dev = [
"cibuildwheel[test,bin]",
]
docs = [
"jinja2>=3.1.2",
"mkdocs-include-markdown-plugin==6.2.2",
Expand All @@ -80,18 +91,12 @@ test = [
"tomli_w",
"validate-pyproject",
]
uv = ["uv"]

[project.scripts]
cibuildwheel = "cibuildwheel.__main__:main"

[project.entry-points."validate_pyproject.tool_schema"]
cibuildwheel = "cibuildwheel.schema:get_schema"
dev = [
{include-group = "bin"},
{include-group = "docs"},
{include-group = "test"},
]

[project.urls]
Changelog = "https://github.com/pypa/cibuildwheel#changelog"
Documentation = "https://cibuildwheel.pypa.io"
Homepage = "https://github.com/pypa/cibuildwheel"

[tool.pytest.ini_options]
minversion = "6.0"
Expand Down
1 change: 0 additions & 1 deletion requirements-dev.txt

This file was deleted.

0 comments on commit 831a075

Please sign in to comment.