From 5bde2e0b40cf5569dae005f48e70944d8e0163f5 Mon Sep 17 00:00:00 2001 From: Sylwester Arabas Date: Sat, 26 Oct 2024 13:43:49 +0200 Subject: [PATCH 1/2] fix wheel names and metadata on macos-14 builds --- .github/workflows/tests+pypi.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/tests+pypi.yml b/.github/workflows/tests+pypi.yml index 4e7ea9e3..5206a35c 100644 --- a/.github/workflows/tests+pypi.yml +++ b/.github/workflows/tests+pypi.yml @@ -138,15 +138,16 @@ jobs: python -m build 2>&1 | tee build.log exit `fgrep -i warning build.log | grep -v "WARNING setuptools_scm" | grep -v "-warnings" | grep -v "All Warnings are enabled" | wc -l` - - if: startsWith(matrix.platform, 'macos-12') && matrix.python-version == '3.11' + - if: startsWith(matrix.platform, 'macos-') run: | - # workaround for buggy universal2 wheel name with Python 3.11 (contains x86_64 binary only) + # workaround for buggy universal2 wheel names (contain single arch binary only!) for whl in dist/*_universal2.whl; do - export whl_new=${whl/_universal2/_x86_64}; + export arch=`python -c 'import platform; print(platform.machine())'`; + export whl_new=${whl/_universal2/_$arch}; mv $whl $whl_new; python -m wheel unpack $whl_new; export whl_new_unpacked=`basename $whl_new | cut -d- -f-2`; - sed -i '' 's/_universal2/_x86_64/g' $whl_new_unpacked/$whl_new_unpacked.dist-info/WHEEL; + sed -i '' 's/_universal2/_$arch/g' $whl_new_unpacked/$whl_new_unpacked.dist-info/WHEEL; python -m wheel pack $whl_new_unpacked; done From d20948065ae47a1b417e5cd6f7b87622737ad652 Mon Sep 17 00:00:00 2001 From: Sylwester Arabas Date: Sat, 26 Oct 2024 14:44:21 +0200 Subject: [PATCH 2/2] separate conditions for macos-12 and macos-14 --- .github/workflows/tests+pypi.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests+pypi.yml b/.github/workflows/tests+pypi.yml index 5206a35c..87353e34 100644 --- a/.github/workflows/tests+pypi.yml +++ b/.github/workflows/tests+pypi.yml @@ -138,7 +138,7 @@ jobs: python -m build 2>&1 | tee build.log exit `fgrep -i warning build.log | grep -v "WARNING setuptools_scm" | grep -v "-warnings" | grep -v "All Warnings are enabled" | wc -l` - - if: startsWith(matrix.platform, 'macos-') + - if: ${{ (matrix.platform == 'macos-12' && matrix.python-version == '3.11') || matrix.platform == 'macos-14' }} run: | # workaround for buggy universal2 wheel names (contain single arch binary only!) for whl in dist/*_universal2.whl; do