Skip to content

Commit 10a0af4

Browse files
authored
Use uv to build windows wheels (pyca#11558)
refs pyca#11548
1 parent 6aacdc1 commit 10a0af4

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

.github/workflows/wheel-builder.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -315,25 +315,25 @@ jobs:
315315
echo "OPENSSL_DIR=C:/openssl-${{ matrix.WINDOWS.WINDOWS }}" >> $GITHUB_ENV
316316
echo "OPENSSL_STATIC=1" >> $GITHUB_ENV
317317
shell: bash
318-
- name: Install Python dependencies
319-
run: python -m pip install --require-hashes -r ${{ env.BUILD_REQUIREMENTS_PATH }}
318+
319+
- run: pip install uv
320320
- run: mkdir wheelhouse
321321
- run: |
322322
if [ -n "${{ matrix.PYTHON.ABI_VERSION }}" ]; then
323-
PY_LIMITED_API="--config-settings=build-args=--features=pyo3/abi3-${{ matrix.PYTHON.ABI_VERSION }} --no-build-isolation"
323+
PY_LIMITED_API="--config-settings=build-args=--features=pyo3/abi3-${{ matrix.PYTHON.ABI_VERSION }}"
324324
fi
325325
326-
python -m pip wheel -v --no-deps cryptography*.tar.gz $PY_LIMITED_API -w dist/
327-
mv dist/cryptography*.whl wheelhouse/
326+
uv build --wheel --require-hashes --build-constraint=$BUILD_REQUIREMENTS_PATH cryptography*.tar.gz $PY_LIMITED_API -o wheelhouse/
328327
shell: bash
329-
- run: pip install -f wheelhouse --no-index cryptography
328+
329+
- run: uv venv
330+
- run: uv pip install --require-hashes -r ${{ env.BUILD_REQUIREMENTS_PATH }}
331+
- run: uv pip install cryptography --no-index -f wheelhouse/
330332
- name: Print the OpenSSL we built and linked against
331333
run: |
332-
python -c "from cryptography.hazmat.backends.openssl.backend import backend;print('Loaded: ' + backend.openssl_version_text());print('Linked Against: ' + backend._ffi.string(backend._lib.OPENSSL_VERSION_TEXT).decode('ascii'))"
334+
.venv/Scripts/python -c "from cryptography.hazmat.backends.openssl.backend import backend;print('Loaded: ' + backend.openssl_version_text());print('Linked Against: ' + backend._ffi.string(backend._lib.OPENSSL_VERSION_TEXT).decode('ascii'))"
333335
334-
- run: mkdir cryptography-wheelhouse
335-
- run: move wheelhouse\cryptography*.whl cryptography-wheelhouse\
336336
- uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0
337337
with:
338338
name: "cryptography-${{ github.event.inputs.version }}-${{ matrix.WINDOWS.WINDOWS }}-${{ matrix.PYTHON.VERSION }}-${{ matrix.PYTHON.ABI_VERSION }}"
339-
path: cryptography-wheelhouse\
339+
path: wheelhouse\

0 commit comments

Comments
 (0)