From cb46a272b7a384853a8d90387156ad446a04b6fa Mon Sep 17 00:00:00 2001 From: Joe Rickerby Date: Mon, 11 Mar 2024 09:17:38 +0000 Subject: [PATCH 1/4] Fix executable name, that doesn't always exist on windows --- test/test_from_sdist.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/test_from_sdist.py b/test/test_from_sdist.py index 0021a2acb..f999eaf44 100644 --- a/test/test_from_sdist.py +++ b/test/test_from_sdist.py @@ -69,7 +69,7 @@ def test_simple(tmp_path): assert os.path.exists('{package}/setup.py') """, ) - setup_py_assertion_cmd = f'python3 -c "{setup_py_assertion_snippet !s}"' + setup_py_assertion_cmd = f'python -c "{setup_py_assertion_snippet !s}"' # build the wheels from sdist actual_wheels = cibuildwheel_from_sdist_run( From b0186bee025f51300ed4991d9fd0f4445b78d41e Mon Sep 17 00:00:00 2001 From: Joe Rickerby Date: Mon, 11 Mar 2024 09:18:24 +0000 Subject: [PATCH 2/4] Use the `python3` executable on macOS Cirrus --- .cirrus.yml | 12 +++++------- examples/cirrus-ci-intel-mac.yml | 5 ++--- examples/cirrus-ci-minimal.yml | 5 ++--- 3 files changed, 9 insertions(+), 13 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index d3c764de8..65fa34488 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -1,10 +1,10 @@ -only_if: changesInclude('.cirrus.yml') || ($BRANCH == "main" && !changesIncludeOnly('docs/*', '.pre-commit-config.yaml')) +only_if: changesInclude('.cirrus.yml') || ($CIRRUS_BRANCH == "main" && !changesIncludeOnly('docs/*', '.pre-commit-config.yaml')) || $CIRRUS_BRANCH =~ 'cirrus.*' run_tests: &RUN_TESTS install_cibuildwheel_script: - - python -m pip install -e ".[dev]" pytest-custom-exit-code + - python3 -m pip install -e ".[dev]" pytest-custom-exit-code run_cibuildwheel_tests_script: - - python ./bin/run_tests.py + - python3 ./bin/run_tests.py linux_x86_task: @@ -50,25 +50,23 @@ windows_x86_task: macos_arm64_task: macos_instance: - image: ghcr.io/cirruslabs/macos-monterey-xcode + image: ghcr.io/cirruslabs/macos-sonoma-xcode env: PATH: /opt/homebrew/opt/python@3.10/bin:$PATH install_pre_requirements_script: - brew install python@3.10 - - ln -s python3 /opt/homebrew/opt/python@3.10/bin/python <<: *RUN_TESTS macos_arm64_cp38_task: macos_instance: - image: ghcr.io/cirruslabs/macos-monterey-xcode + image: ghcr.io/cirruslabs/macos-sonoma-xcode env: PATH: /opt/homebrew/opt/python@3.10/bin:$PATH PYTEST_ADDOPTS: --run-cp38-universal2 -k 'test_cp38_arm64_testing_universal2_installer or test_arch_auto' install_pre_requirements_script: - brew install python@3.10 - - ln -s python3 /opt/homebrew/opt/python@3.10/bin/python - curl -fsSLO https://www.python.org/ftp/python/3.8.10/python-3.8.10-macos11.pkg - sudo installer -pkg python-3.8.10-macos11.pkg -target / - rm python-3.8.10-macos11.pkg diff --git a/examples/cirrus-ci-intel-mac.yml b/examples/cirrus-ci-intel-mac.yml index c510808ea..73a22f499 100644 --- a/examples/cirrus-ci-intel-mac.yml +++ b/examples/cirrus-ci-intel-mac.yml @@ -1,6 +1,6 @@ build_and_store_wheels: &BUILD_AND_STORE_WHEELS install_cibuildwheel_script: - - python -m pip install cibuildwheel==2.16.5 + - python3 -m pip install cibuildwheel==2.16.5 run_cibuildwheel_script: - cibuildwheel wheels_artifacts: @@ -10,12 +10,11 @@ build_and_store_wheels: &BUILD_AND_STORE_WHEELS macos_task: name: Build macOS x86_64 and arm64 wheels. macos_instance: - image: ghcr.io/cirruslabs/macos-monterey-xcode + image: ghcr.io/cirruslabs/macos-sonoma-xcode env: PATH: /opt/homebrew/opt/python@3.10/bin:$PATH CIBW_ARCHS_MACOS: x86_64 arm64 install_pre_requirements_script: - brew install python@3.10 - - ln -s python3 /opt/homebrew/opt/python@3.10/bin/python <<: *BUILD_AND_STORE_WHEELS diff --git a/examples/cirrus-ci-minimal.yml b/examples/cirrus-ci-minimal.yml index 53ef414b4..de18949b7 100644 --- a/examples/cirrus-ci-minimal.yml +++ b/examples/cirrus-ci-minimal.yml @@ -1,6 +1,6 @@ build_and_store_wheels: &BUILD_AND_STORE_WHEELS install_cibuildwheel_script: - - python -m pip install cibuildwheel==2.16.5 + - python3 -m pip install cibuildwheel==2.16.5 run_cibuildwheel_script: - cibuildwheel wheels_artifacts: @@ -50,11 +50,10 @@ windows_x86_task: macos_arm64_task: name: Build macOS arm64 wheels. macos_instance: - image: ghcr.io/cirruslabs/macos-monterey-xcode + image: ghcr.io/cirruslabs/macos-sonoma-xcode env: PATH: /opt/homebrew/opt/python@3.10/bin:$PATH install_pre_requirements_script: - brew install python@3.10 - - ln -s python3 /opt/homebrew/opt/python@3.10/bin/python <<: *BUILD_AND_STORE_WHEELS From e0f9c7d528a27120e47e633197524815b4826022 Mon Sep 17 00:00:00 2001 From: Joe Rickerby Date: Mon, 11 Mar 2024 18:31:32 +0000 Subject: [PATCH 3/4] Homebrew changed where it puts the python binaries --- .cirrus.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index 65fa34488..8e19e50ff 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -2,9 +2,9 @@ only_if: changesInclude('.cirrus.yml') || ($CIRRUS_BRANCH == "main" && !changesI run_tests: &RUN_TESTS install_cibuildwheel_script: - - python3 -m pip install -e ".[dev]" pytest-custom-exit-code + - python -m pip install -e ".[dev]" pytest-custom-exit-code run_cibuildwheel_tests_script: - - python3 ./bin/run_tests.py + - python ./bin/run_tests.py linux_x86_task: @@ -53,7 +53,7 @@ macos_arm64_task: image: ghcr.io/cirruslabs/macos-sonoma-xcode env: - PATH: /opt/homebrew/opt/python@3.10/bin:$PATH + PATH: /opt/homebrew/opt/python@3.10/libexec/bin:$PATH install_pre_requirements_script: - brew install python@3.10 <<: *RUN_TESTS @@ -63,7 +63,7 @@ macos_arm64_cp38_task: image: ghcr.io/cirruslabs/macos-sonoma-xcode env: - PATH: /opt/homebrew/opt/python@3.10/bin:$PATH + PATH: /opt/homebrew/opt/python@3.10/libexec/bin:$PATH PYTEST_ADDOPTS: --run-cp38-universal2 -k 'test_cp38_arm64_testing_universal2_installer or test_arch_auto' install_pre_requirements_script: - brew install python@3.10 From 6224bb27877ebcd1d0b10a7f9d1817b50ff6476b Mon Sep 17 00:00:00 2001 From: Joe Rickerby Date: Mon, 11 Mar 2024 18:36:03 +0000 Subject: [PATCH 4/4] Update examples to match new config --- examples/cirrus-ci-intel-mac.yml | 4 ++-- examples/cirrus-ci-minimal.yml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/cirrus-ci-intel-mac.yml b/examples/cirrus-ci-intel-mac.yml index 73a22f499..9529c80e8 100644 --- a/examples/cirrus-ci-intel-mac.yml +++ b/examples/cirrus-ci-intel-mac.yml @@ -1,6 +1,6 @@ build_and_store_wheels: &BUILD_AND_STORE_WHEELS install_cibuildwheel_script: - - python3 -m pip install cibuildwheel==2.16.5 + - python -m pip install cibuildwheel==2.16.5 run_cibuildwheel_script: - cibuildwheel wheels_artifacts: @@ -13,7 +13,7 @@ macos_task: image: ghcr.io/cirruslabs/macos-sonoma-xcode env: - PATH: /opt/homebrew/opt/python@3.10/bin:$PATH + PATH: /opt/homebrew/opt/python@3.10/libexec/bin:$PATH CIBW_ARCHS_MACOS: x86_64 arm64 install_pre_requirements_script: - brew install python@3.10 diff --git a/examples/cirrus-ci-minimal.yml b/examples/cirrus-ci-minimal.yml index de18949b7..99562aab5 100644 --- a/examples/cirrus-ci-minimal.yml +++ b/examples/cirrus-ci-minimal.yml @@ -1,6 +1,6 @@ build_and_store_wheels: &BUILD_AND_STORE_WHEELS install_cibuildwheel_script: - - python3 -m pip install cibuildwheel==2.16.5 + - python -m pip install cibuildwheel==2.16.5 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/bin:$PATH + PATH: /opt/homebrew/opt/python@3.10/libexec/bin:$PATH install_pre_requirements_script: - brew install python@3.10 <<: *BUILD_AND_STORE_WHEELS