Skip to content

Commit

Permalink
Build Python 3.9 and 3.10 M1 wheels (#304)
Browse files Browse the repository at this point in the history
* Build Python 3.9 and 3.10 M1 wheels

* Find brew-python paths

* Cancel-workflow to 0.9.1 - test Python 3.10 on Mac/Ubuntu (#303)

* cancel-workflow to 0.9.1 - test Python 3.10

* Revert e73751e and change to single \ later

* python is in /opt/homebrew

* source not found

* no dash in cp39, cp310

* use brew install instead

* pip install delocate-wheel

* $(brew --prefix python@3.9)

* shorten path

* path is already full

* Update path and correct delocate install
  • Loading branch information
hoffmang9 committed Jan 9, 2022
1 parent b185983 commit 8db60d7
Showing 1 changed file with 31 additions and 14 deletions.
45 changes: 31 additions & 14 deletions .github/workflows/build-m1-wheel.yml
Expand Up @@ -29,29 +29,46 @@ jobs:
with:
fetch-depth: 0

- name: Lint source with flake8
- name: Brew update Python
run: |
arch -arm64 python -m pip install --upgrade pip
arch -arm64 pip install flake8
arch -arm64 flake8 src setup.py python-bindings python-impl
arch -arm64 brew install python@3.9
arch -arm64 brew install python@3.10
- name: Lint source with mypy
run: |
arch -arm64 pip install mypy
arch -arm64 mypy --config-file mypi.ini python-bindings python-impl
- name: Build m1 wheels
- name: Build m1 wheels for 3.9 and 3.10
run: |
rm -rf venv
arch -arm64 $(brew --prefix python@3.9)/libexec/bin/python -m venv venv
. venv/bin/activate
arch -arm64 pip wheel -w dist --no-deps .
arch -arm64 pip install delocate
arch -arm64 delocate-wheel -v dist/*cp39*.whl
deactivate
rm -rf venv
arch -arm64 $(brew --prefix python@3.10)/libexec/bin/python -m venv venv
. venv/bin/activate
arch -arm64 pip wheel -w dist --no-deps .
arch -arm64 delocate-wheel -v dist/*.whl
arch -arm64 pip install delocate
arch -arm64 delocate-wheel -v dist/*cp310*.whl
deactivate
rm -rf venv
- name: Test wheel
run: |
arch -arm64 python3 -m venv venv
. ./venv/bin/activate
arch -arm64 pip install ./dist/*.whl
rm -rf venv
arch -arm64 $(brew --prefix python@3.9)/libexec/bin/python -m venv venv
. venv/bin/activate
arch -arm64 pip install ./dist/*cp39*.whl
arch -arm64 pip install pytest
arch -arm64 ./venv/bin/pytest -v ./python-bindings/test.py
deactivate
rm -rf venv
arch -arm64 $(brew --prefix python@3.10)/libexec/bin/python -m venv venv
. venv/bin/activate
arch -arm64 pip install ./dist/*cp310*.whl
arch -arm64 pip install pytest
arch -arm64 ./venv/bin/pytest -v ./python-bindings/test.py
deactivate
rm -rf venv
- name: Create sha256 hash
run: |
Expand Down

0 comments on commit 8db60d7

Please sign in to comment.