From 90629d3c1f7d469135d9cb8be58721c38084586e Mon Sep 17 00:00:00 2001 From: Henry Schreiner Date: Tue, 11 Jun 2024 11:45:29 -0400 Subject: [PATCH 1/2] ci: use uv in cibuildwheel --- .cirrus.yml | 6 +++--- .github/workflows/wheels.yml | 5 +++++ pyproject.toml | 1 + 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index 09ffa13..13d6513 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -1,7 +1,7 @@ build_and_store_wheels: &BUILD_AND_STORE_WHEELS only_if: $CIRRUS_BRANCH == 'main' || $CIRRUS_TAG != '' || $CIRRUS_PR != '' install_cibuildwheel_script: - - python -m pip install cibuildwheel==2.17.0 + - python -m pip install cibuildwheel[uv]==2.19.0 run_cibuildwheel_script: - cibuildwheel wheels_artifacts: @@ -53,7 +53,7 @@ macos_arm64_task: image: ghcr.io/cirruslabs/macos-sonoma-xcode env: - PATH: /opt/homebrew/opt/python@3.10/libexec/bin:$PATH + PATH: /opt/homebrew/opt/python@3.12/libexec/bin:$PATH install_pre_requirements_script: - - brew install python@3.10 + - brew install python@3.12 <<: *BUILD_AND_STORE_WHEELS diff --git a/.github/workflows/wheels.yml b/.github/workflows/wheels.yml index 9bfe900..783b7da 100644 --- a/.github/workflows/wheels.yml +++ b/.github/workflows/wheels.yml @@ -5,6 +5,9 @@ on: release: types: - published + pull_request: + paths: + - .github/workflows/wheels.yml jobs: make_sdist: @@ -36,6 +39,8 @@ jobs: with: fetch-depth: 0 + - uses: yezz123/setup-uv@v4 + - uses: pypa/cibuildwheel@v2.19.0 - name: Upload wheels diff --git a/pyproject.toml b/pyproject.toml index 0e2e169..18dabd7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -71,6 +71,7 @@ write_to = "src/pylibmagic/_version.py" [tool.cibuildwheel] +build-frontend = "build[uv]" test-extras = ["test"] test-command = "pytest {project}/tests" archs = ["auto64"] From f655e4176a1bdff709eca7994250f49b63aeb370 Mon Sep 17 00:00:00 2001 From: Henry Schreiner Date: Tue, 11 Jun 2024 12:08:50 -0400 Subject: [PATCH 2/2] Update .cirrus.yml --- .cirrus.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index 13d6513..6e37721 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -53,7 +53,7 @@ macos_arm64_task: image: ghcr.io/cirruslabs/macos-sonoma-xcode env: - PATH: /opt/homebrew/opt/python@3.12/libexec/bin:$PATH + PATH: /opt/homebrew/opt/python@3.10/libexec/bin:$PATH install_pre_requirements_script: - - brew install python@3.12 + - brew install python@3.10 <<: *BUILD_AND_STORE_WHEELS