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 113616f
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 28 deletions.
22 changes: 12 additions & 10 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,8 +137,9 @@ 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: |
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
36 changes: 19 additions & 17 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 Expand Up @@ -227,6 +232,3 @@ flake8-unused-arguments.ignore-variadic-names = true

[tool.repo-review]
ignore = ["PC170", "PP303"]

[tool.check-wheel-contents]
ignore = ["W002"] # requirements-*.txt are allowed to be duplicates of one another
1 change: 0 additions & 1 deletion requirements-dev.txt

This file was deleted.

0 comments on commit 113616f

Please sign in to comment.