From d45055ce3dbbf816287fc874929d98a048fbda69 Mon Sep 17 00:00:00 2001 From: Mike Hommey Date: Thu, 11 Feb 2021 20:08:55 +0900 Subject: [PATCH 1/3] ci: upgrade cibuildwheel to 1.9.0 --- ci/requirements.macoswheels.txt | 29 +++++++++++++++++++++++------ 1 file changed, 23 insertions(+), 6 deletions(-) diff --git a/ci/requirements.macoswheels.txt b/ci/requirements.macoswheels.txt index a66f5733..b1fd3cac 100644 --- a/ci/requirements.macoswheels.txt +++ b/ci/requirements.macoswheels.txt @@ -5,17 +5,34 @@ # pip-compile --generate-hashes --output-file=ci/requirements.macoswheels.txt ci/requirements.macoswheels.in # bashlex==0.15 \ - --hash=sha256:fe539cf9eba046f60a8d32eda2a28e9dccdd06cb4b9f5089ec658348ea53a6dd \ + --hash=sha256:fe539cf9eba046f60a8d32eda2a28e9dccdd06cb4b9f5089ec658348ea53a6dd + # via cibuildwheel +bracex==2.1.1 \ + --hash=sha256:01f715cd0ed7a622ec8b32322e715813f7574de531f09b70f6f3b2c10f682425 \ + --hash=sha256:64e2a6d14de9c8e022cf40539ac8468ba7c4b99550a2b05fc87fd20e392e568f # via cibuildwheel certifi==2020.12.5 \ --hash=sha256:1a4995114262bffbc2413b159f2a1a480c969de6e6eb13ee966d470af86af59c \ - --hash=sha256:719a74fb9e33b9bd44cc7f3a8d94bc35e4049deebe19ba7d8e108280cfd59830 \ + --hash=sha256:719a74fb9e33b9bd44cc7f3a8d94bc35e4049deebe19ba7d8e108280cfd59830 # via cibuildwheel -cibuildwheel==1.7.2 \ - --hash=sha256:894abe607b84d0185a338793afa6b69b664b5690431cf29932a03b88233eff3a \ - --hash=sha256:fb6a8af4017ae5d8598722257ba18e5fde7a2b909f95846f4d77596350271d90 \ +cibuildwheel==1.9.0 \ + --hash=sha256:620a8483bd26c87f7892f1310648be93767b28d878194e8410f39d534c77bffd \ + --hash=sha256:ebaaed43304456c61f204f7978a5905ac11ad82c72adcee29f0486351d7a8c9e # via -r ci/requirements.macoswheels.in +packaging==20.9 \ + --hash=sha256:5b327ac1320dc863dca72f4514ecc086f31186744b84a230374cc1fd776feae5 \ + --hash=sha256:67714da7f7bc052e064859c05c595155bd1ee9f69f76557e21f051443c20947a + # via cibuildwheel +pyparsing==2.4.7 \ + --hash=sha256:c203ec8783bf771a155b207279b9bccb8dea02d8f0c9e5f8ead507bc3246ecc1 \ + --hash=sha256:ef9d7589ef3c200abe66653d3f1ab1033c3c419ae9b9bdb1240a85b024efc88b + # via packaging toml==0.10.2 \ --hash=sha256:806143ae5bfb6a3c6e736a764057db0e6a0e05e338b5630894a5f779cabb4f9b \ - --hash=sha256:b3bda1d108d5dd99f4a20d24d9c348e91c4db7ab1b749200bded2f839ccbe68f \ + --hash=sha256:b3bda1d108d5dd99f4a20d24d9c348e91c4db7ab1b749200bded2f839ccbe68f + # via cibuildwheel +typing-extensions==3.7.4.3 \ + --hash=sha256:7cb407020f00f7bfc3cb3e7881628838e69d8f3fcab2f64742a5e76b2f841918 \ + --hash=sha256:99d4073b617d30288f569d3f13d2bd7548c3a7e4c8de87db09a9d29bb3a4a60c \ + --hash=sha256:dafc7639cde7f1b6e1acc0f457842a83e722ccca8eef5270af2d74792619a89f # via cibuildwheel From 23d9016e6534f157a1008399a0f17787ea2c62b4 Mon Sep 17 00:00:00 2001 From: Mike Hommey Date: Thu, 11 Feb 2021 20:12:20 +0900 Subject: [PATCH 2/3] ci: build wheels for arm64 macos --- .github/workflows/wheel.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/wheel.yml b/.github/workflows/wheel.yml index 4c596ea1..08afb218 100644 --- a/.github/workflows/wheel.yml +++ b/.github/workflows/wheel.yml @@ -42,8 +42,13 @@ jobs: - 'cp37-*' - 'cp38-*' - 'cp39-*' + arch: ['x86_64'] + include: + - py: 'cp39-*' + arch: 'arm64' runs-on: 'macos-10.15' env: + CIBW_ARCHS: ${{ matrix.arch }} CIBW_BUILD: ${{ matrix.py }} CIBW_BUILD_VERBOSITY: '1' ZSTD_WARNINGS_AS_ERRORS: '1' From e72425ce09f04b9c719a1853ef73d8c030fc19f6 Mon Sep 17 00:00:00 2001 From: Mike Hommey Date: Thu, 11 Feb 2021 20:30:20 +0900 Subject: [PATCH 3/3] ci: add wheels for Xcode's arm64 python 3.8 Upstream python only support arm64 starting from python 3.9, but Xcode ships with an arm64 python 3.8. As cibuildwheel doesn't support using Xcode's python, handle this case manually. --- .github/workflows/wheel.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/.github/workflows/wheel.yml b/.github/workflows/wheel.yml index 08afb218..44a7ed13 100644 --- a/.github/workflows/wheel.yml +++ b/.github/workflows/wheel.yml @@ -44,6 +44,8 @@ jobs: - 'cp39-*' arch: ['x86_64'] include: + - py: 'cp38-*' + arch: 'arm64' - py: 'cp39-*' arch: 'arm64' runs-on: 'macos-10.15' @@ -57,16 +59,35 @@ jobs: uses: actions/setup-python@v2 with: python-version: '3.8' + if: ${{ matrix.py != 'cp38-*' || matrix.arch != 'arm64' }} - uses: actions/checkout@v2 - name: Install Dependencies run: | pip install --require-hashes -r ci/requirements.macoswheels.txt + if: ${{ matrix.py != 'cp38-*' || matrix.arch != 'arm64' }} + + - name: Install Dependencies + run: | + /Applications/Xcode_12.2.app/Contents/Developer/usr/bin/pip3 install --user --require-hashes -r ci/requirements.macoswheels.txt + /Applications/Xcode_12.2.app/Contents/Developer/usr/bin/pip3 install --user wheel + if: ${{ matrix.py == 'cp38-*' && matrix.arch == 'arm64' }} - name: Build Wheel run: | cibuildwheel --output-dir dist + if: ${{ matrix.py != 'cp38-*' || matrix.arch != 'arm64' }} + + - name: Build Wheel + run: | + /Applications/Xcode_12.2.app/Contents/Developer/usr/bin/python3 setup.py bdist_wheel + env: + _PYTHON_HOST_PLATFORM: 'macosx-11.0-arm64' + ARCHFLAGS: '-arch arm64' + MACOSX_DEPLOYMENT_TARGET: '11.0' + SDKROOT: '/Applications/Xcode_12.2.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.0.sdk' + if: ${{ matrix.py == 'cp38-*' && matrix.arch == 'arm64' }} - name: Upload Wheel uses: actions/upload-artifact@v2