Skip to content

Commit

Permalink
avoid bogus naming of the macos wheels as universal2 despite intel-on…
Browse files Browse the repository at this point in the history
…ly (#309)
  • Loading branch information
slayoo authored Dec 5, 2023
1 parent a35f543 commit 938be42
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions .github/workflows/tests+pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ jobs:
brew reinstall gcc
sudo xcode-select -s "/Applications/Xcode_13.4.1.app"
echo MACOSX_DEPLOYMENT_TARGET=`sw_vers -productVersion` >> $GITHUB_ENV
echo ARCHFLAGS="-arch x86_64" >> $GITHUB_ENV # this seems to have no effect on whl name on Python 3.11!
- if: matrix.platform == 'windows-latest'
uses: msys2/setup-msys2@v2
Expand Down Expand Up @@ -133,6 +134,18 @@ jobs:
python -m build 2>&1 | tee build.log
exit `fgrep -i warning build.log | grep -v "WARNING setuptools_scm" | wc -l`
- if: startsWith(matrix.platform, 'macos-') && matrix.python-version == '3.11'
run: |
# workaround for buggy universal2 wheel name with Python 3.11 (contains x86_64 binary only)
for whl in dist/*_universal2.whl; do
export whl_new=${whl/_universal2/_x86_64};
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;
python -m wheel pack $whl_new_unpacked;
done
- if: matrix.platform == 'ubuntu-latest'
run: rm dist/*

Expand Down

0 comments on commit 938be42

Please sign in to comment.