Skip to content

Commit 8f8cb8d

Browse files
authored
build: fix building of wheels with uv (#370)
* fix: fix building of wheels with uv * install uv * remove test dep * add contents write too * add checkout * comment out PR
1 parent 6fc496c commit 8f8cb8d

File tree

2 files changed

+11
-9
lines changed

2 files changed

+11
-9
lines changed

.github/workflows/pypi.yml

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,6 @@ on:
77
# pull_request:
88

99
jobs:
10-
test:
11-
uses: pyapp-kit/workflows/.github/workflows/test-pyrepo.yml@v2
12-
with:
13-
hatch-build-hooks-enable: true
14-
coverage-upload: none
15-
1610
build-sdist:
1711
name: 🐍 sdist and universal wheel
1812
runs-on: ubuntu-latest
@@ -33,6 +27,7 @@ jobs:
3327
- uses: actions/checkout@v4
3428
with:
3529
fetch-depth: 0
30+
- uses: astral-sh/setup-uv@v6
3631
- name: Build wheels via cibuildwheel
3732
uses: pypa/cibuildwheel@v2.23
3833
- name: Upload wheels artifacts
@@ -43,12 +38,14 @@ jobs:
4338

4439
publish:
4540
name: Publish to PyPI
46-
needs: [test, build-sdist, build-wheels]
47-
if: startsWith(github.ref, 'refs/tags/v')
41+
needs: [build-sdist, build-wheels]
42+
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
4843
runs-on: ubuntu-latest
4944
permissions:
5045
id-token: write
46+
contents: write
5147
steps:
48+
5249
- name: Get sdist
5350
uses: actions/download-artifact@v4
5451
with:
@@ -64,6 +61,10 @@ jobs:
6461
- name: 🚢 Publish to PyPI
6562
uses: pypa/gh-action-pypi-publish@release/v1
6663

64+
- uses: actions/checkout@v4
65+
with:
66+
fetch-depth: 0
67+
6768
- uses: softprops/action-gh-release@v2
6869
with:
6970
generate_release_notes: true

pyproject.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,9 +120,10 @@ exclude = [
120120
# Skip 32-bit builds & PyPy wheels on all platforms
121121
skip = ["*-manylinux_i686", "*-musllinux_i686", "*-win32", "pp*"]
122122
build = ["cp39-*", "cp310-*", "cp311-*", "cp312-*", "cp313-*"]
123-
test-extras = ["test"]
123+
test-groups = ["test"]
124124
test-command = "pytest {project}/tests -v"
125125
test-skip = ["*-musllinux*", "cp312-win*", "*-macosx_arm64"]
126+
build-frontend = "build[uv]"
126127

127128
[[tool.cibuildwheel.overrides]]
128129
select = "*-manylinux_i686*"

0 commit comments

Comments
 (0)