Skip to content

Commit 831a075

Browse files
committed
chore: use dependency-groups
Signed-off-by: Henry Schreiner <[email protected]>
1 parent 66d45de commit 831a075

File tree

3 files changed

+32
-26
lines changed

3 files changed

+32
-26
lines changed

.github/workflows/test.yml

+13-11
Original file line numberDiff line numberDiff line change
@@ -67,11 +67,11 @@ jobs:
6767

6868
- name: Install dependencies
6969
run: |
70-
uv pip install --system ".[test]"
70+
uv sync
7171
7272
- name: Generate a sample project
7373
run: |
74-
python -m test.test_projects test.test_0_basic.basic_project sample_proj
74+
uv run -m test.test_projects test.test_0_basic.basic_project sample_proj
7575
7676
- name: Run a sample build (GitHub Action)
7777
uses: ./
@@ -124,7 +124,7 @@ jobs:
124124

125125
- name: Test cibuildwheel
126126
run: |
127-
python ./bin/run_tests.py --run-podman
127+
uv run bin/run_tests.py --run-podman
128128
129129
emulated-archs:
130130
name: Get qemu emulated architectures
@@ -137,12 +137,13 @@ jobs:
137137
- uses: actions/setup-python@v5
138138
with:
139139
python-version: "3.x"
140+
- uses: astral-sh/setup-uv@v3
140141
- name: Install dependencies
141-
run: python -m pip install ".[test]"
142+
run: uv sync
142143
- name: Get qemu emulated architectures
143144
id: archs
144145
run: |
145-
OUTPUT=$(python -c "from json import dumps; from test.utils import EMULATED_ARCHS; print(dumps(EMULATED_ARCHS))")
146+
OUTPUT=$(.venv/bin/python -c "from json import dumps; from test.utils import EMULATED_ARCHS; print(dumps(EMULATED_ARCHS))")
146147
echo "${OUTPUT}"
147148
echo "archs=${OUTPUT}" >> "$GITHUB_OUTPUT"
148149
@@ -159,14 +160,15 @@ jobs:
159160
- uses: actions/setup-python@v5
160161
with:
161162
python-version: "3.x"
163+
- uses: astral-sh/setup-uv@v3
162164
- name: Install dependencies
163-
run: python -m pip install ".[test,uv]"
165+
run: uv sync
164166

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

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

171173
test-pyodide:
172174
name: Test cibuildwheel building pyodide wheels
@@ -179,14 +181,14 @@ jobs:
179181
name: Install Python 3.12
180182
with:
181183
python-version: '3.12'
184+
- uses: astral-sh/setup-uv@v3
182185

183186
- name: Install dependencies
184-
run: |
185-
python -m pip install ".[test]"
187+
run: uv sync
186188

187189
- name: Generate a sample project
188190
run: |
189-
python -m test.test_projects test.test_0_basic.basic_project sample_proj
191+
uv run -m test.test_projects test.test_0_basic.basic_project sample_proj
190192
191193
- name: Run a sample build (GitHub Action)
192194
uses: ./
@@ -198,6 +200,6 @@ jobs:
198200

199201
- name: Run tests with 'CIBW_PLATFORM' set to 'pyodide'
200202
run: |
201-
python ./bin/run_tests.py
203+
uv run ./bin/run_tests.py
202204
env:
203205
CIBW_PLATFORM: pyodide

pyproject.toml

+19-14
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,20 @@ dependencies = [
5151
]
5252

5353
[project.optional-dependencies]
54+
uv = ["uv"]
55+
56+
[project.scripts]
57+
cibuildwheel = "cibuildwheel.__main__:main"
58+
59+
[project.entry-points."validate_pyproject.tool_schema"]
60+
cibuildwheel = "cibuildwheel.schema:get_schema"
61+
62+
[project.urls]
63+
Changelog = "https://github.com/pypa/cibuildwheel#changelog"
64+
Documentation = "https://cibuildwheel.pypa.io"
65+
Homepage = "https://github.com/pypa/cibuildwheel"
66+
67+
[dependency-groups]
5468
bin = [
5569
"click",
5670
"packaging>=21.0",
@@ -60,9 +74,6 @@ bin = [
6074
"requests",
6175
"rich>=9.6",
6276
]
63-
dev = [
64-
"cibuildwheel[test,bin]",
65-
]
6677
docs = [
6778
"jinja2>=3.1.2",
6879
"mkdocs-include-markdown-plugin==6.2.2",
@@ -80,18 +91,12 @@ test = [
8091
"tomli_w",
8192
"validate-pyproject",
8293
]
83-
uv = ["uv"]
84-
85-
[project.scripts]
86-
cibuildwheel = "cibuildwheel.__main__:main"
87-
88-
[project.entry-points."validate_pyproject.tool_schema"]
89-
cibuildwheel = "cibuildwheel.schema:get_schema"
94+
dev = [
95+
{include-group = "bin"},
96+
{include-group = "docs"},
97+
{include-group = "test"},
98+
]
9099

91-
[project.urls]
92-
Changelog = "https://github.com/pypa/cibuildwheel#changelog"
93-
Documentation = "https://cibuildwheel.pypa.io"
94-
Homepage = "https://github.com/pypa/cibuildwheel"
95100

96101
[tool.pytest.ini_options]
97102
minversion = "6.0"

requirements-dev.txt

-1
This file was deleted.

0 commit comments

Comments
 (0)