Skip to content

Commit c6fdd85

Browse files
gijzelaerrclaude
andauthored
Replace pip with uv across all CI workflows (#658)
- source-build.yml: uv venv + uv pip install build + python -m build → uv build - publish-pypi.yml: pip install build + python -m build → uv build - publish-test-pypi.yml: same - test.yml: uv venv + uv pip install → uv sync --extra - doc.yml: uv venv + uv pip install → uv sync --extra uv venvs don't include pip, so workflows using bare pip or python -m build (which needs pip internally) break. Use uv build for building and uv sync for dependency installation. Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 252a83d commit c6fdd85

File tree

5 files changed

+13
-17
lines changed

5 files changed

+13
-17
lines changed

.github/workflows/doc.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,7 @@ jobs:
2626
with:
2727
enable-cache: true
2828
- name: Install dependencies
29-
run: |
30-
uv venv
31-
uv pip install ".[doc,cli]"
29+
run: uv sync --extra doc --extra cli
3230
- name: Build documentation
3331
run: uv run sphinx-build -N -bhtml doc/ doc/_build -W
3432
- name: Upload Pages artifact

.github/workflows/publish-pypi.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,12 @@ jobs:
1717
uses: actions/setup-python@v6
1818
with:
1919
python-version: "3.12"
20-
- name: Install build
21-
run: pip install build
20+
- name: Install uv
21+
uses: astral-sh/setup-uv@v7
22+
with:
23+
enable-cache: true
2224
- name: Build distribution
23-
run: python -m build
25+
run: uv build
2426
- name: Upload artifact
2527
uses: actions/upload-artifact@v7
2628
with:

.github/workflows/publish-test-pypi.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,12 @@ jobs:
1616
uses: actions/setup-python@v6
1717
with:
1818
python-version: "3.12"
19-
- name: Install build
20-
run: pip install build
19+
- name: Install uv
20+
uses: astral-sh/setup-uv@v7
21+
with:
22+
enable-cache: true
2123
- name: Build distribution
22-
run: python -m build
24+
run: uv build
2325
- name: Upload artifact
2426
uses: actions/upload-artifact@v7
2527
with:

.github/workflows/source-build.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,9 @@ jobs:
2323
uses: astral-sh/setup-uv@v7
2424
with:
2525
enable-cache: true
26-
- name: Install build tools
27-
run: |
28-
uv venv
29-
uv pip install build
3026
- name: Create source tarball
3127
run: |
32-
uv run python -m build . --sdist
28+
uv build --sdist
3329
3430
- name: Upload artifacts
3531
uses: actions/upload-artifact@v7

.github/workflows/test.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,6 @@ jobs:
2828
with:
2929
enable-cache: true
3030
- name: Install dependencies
31-
run: |
32-
uv venv --python python${{ matrix.python-version }}
33-
uv pip install ".[test,s7commplus]"
31+
run: uv sync --extra test --extra s7commplus --python python${{ matrix.python-version }}
3432
- name: Run pytest
3533
run: uv run pytest --cov=snap7 --cov-report=term

0 commit comments

Comments
 (0)