@@ -128,7 +128,7 @@ jobs:
128128 name : ${{ matrix.artifact-name }}
129129 path : build/${{ matrix.artifact-name }}
130130
131- # Build platform-specific wheels with bundled extensions
131+ # Build platform-specific Python wheels
132132 build-wheels :
133133 needs : build-and-test
134134 strategy :
@@ -137,13 +137,15 @@ jobs:
137137 - os : ubuntu-latest
138138 artifact : graphqlite-linux-x86_64.so
139139 extension : graphqlite.so
140+ wheel_tag : manylinux_2_17_x86_64.manylinux2014_x86_64
140141 - os : macos-14
141142 artifact : graphqlite-macos-arm64.dylib
142143 extension : graphqlite.dylib
143- # Note: macos-x86_64 wheel built on arm64 with universal tag
144+ wheel_tag : macosx_11_0_arm64
144145 - os : windows-latest
145146 artifact : graphqlite-windows-x86_64.dll
146147 extension : graphqlite.dll
148+ wheel_tag : win_amd64
147149
148150 runs-on : ${{ matrix.os }}
149151
@@ -173,10 +175,22 @@ jobs:
173175 working-directory : bindings/python
174176 run : python -m build --wheel
175177
178+ - name : Retag wheel with platform
179+ working-directory : bindings/python/dist
180+ run : |
181+ for whl in *.whl; do
182+ python -m wheel tags --platform-tag=${{ matrix.wheel_tag }} "$whl"
183+ rm "$whl"
184+ done
185+ shell : bash
186+
187+ - name : List wheels
188+ run : ls -la bindings/python/dist/
189+
176190 - name : Upload wheel artifact
177191 uses : actions/upload-artifact@v4
178192 with :
179- name : wheel-${{ matrix.os }}
193+ name : wheel-${{ matrix.wheel_tag }}
180194 path : bindings/python/dist/*.whl
181195
182196 publish-python :
@@ -198,15 +212,15 @@ jobs:
198212 path : dist/
199213 merge-multiple : true
200214
201- - name : Install twine
202- run : pip install twine
215+ - name : Install build tools
216+ run : pip install build twine
203217
204218 - name : Build source distribution
205219 working-directory : bindings/python
206- run : |
207- pip install build
208- python -m build --sdist
209- cp dist/*.tar.gz ../../ dist/
220+ run : python -m build --sdist
221+
222+ - name : Copy sdist to dist
223+ run : cp bindings/python/ dist/*.tar.gz dist/
210224
211225 - name : List distributions
212226 run : ls -la dist/
0 commit comments