Skip to content

Commit

Permalink
fix: pkg: update macos wheel repair, simplify wheel building
Browse files Browse the repository at this point in the history
Signed-off-by: Stephen L Arnold <[email protected]>
  • Loading branch information
sarnold committed Jan 15, 2021
1 parent 0e4330f commit f6f7ae8
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 18 deletions.
14 changes: 6 additions & 8 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ jobs:

steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0

- uses: actions/setup-python@v2
name: Install Python
Expand All @@ -27,7 +29,7 @@ jobs:
- name: Install cibuildwheel
run: |
python -m pip install --upgrade pip
pip install -r requirements-cibw.txt
python -m pip install -r requirements-cibw.txt
- name: Build wheels
env:
Expand All @@ -38,18 +40,14 @@ jobs:
CIBW_BEFORE_ALL_LINUX: >
yum -y -q --enablerepo=extras install epel-release
&& yum install -y re2-devel ninja-build
&& pip install .
CIBW_REPAIR_WHEEL_COMMAND_LINUX: "LD_LIBRARY_PATH=/usr/lib64:$LD_LIBRARY_PATH auditwheel repair -w {dest_dir} {wheel}"
CIBW_REPAIR_WHEEL_COMMAND_LINUX: "auditwheel show {wheel} && auditwheel repair -w {dest_dir} {wheel}"
CIBW_BEFORE_ALL_MACOS: >
brew install -s re2
&& brew install pybind11 ninja
&& pip install .
brew install re2 pybind11 ninja
CIBW_ENVIRONMENT_MACOS: MACOSX_DEPLOYMENT_TARGET=10.09
CIBW_REPAIR_WHEEL_COMMAND_MACOS: "DYLD_LIBRARY_PATH=/usr/local/Cellar/re2/20201101/lib:$DYLD_LIBRARY_PATH delocate-listdeps {wheel} && delocate-wheel -w {dest_dir} -v {wheel}"
CIBW_REPAIR_WHEEL_COMMAND_MACOS: "pip uninstall -y delocate && pip install git+https://github.com/Chia-Network/delocate.git && delocate-listdeps {wheel} && delocate-wheel -w {dest_dir} -v {wheel}"
CIBW_BEFORE_ALL_WINDOWS: >
vcpkg install re2:x64-windows
&& vcpkg integrate install
&& pip install .
CIBW_ENVIRONMENT_WINDOWS: 'CMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake'
CIBW_TEST_COMMAND: python -c "import re2"
run: |
Expand Down
18 changes: 8 additions & 10 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,13 @@ jobs:

steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0

- uses: actions/setup-python@v2
name: Install Python
with:
python-version: 3.7
python-version: '3.8'

- name: Prepare compiler environment for Windows
if: runner.os == 'Windows'
Expand All @@ -31,7 +33,7 @@ jobs:
- name: Install cibuildwheel
run: |
python -m pip install --upgrade pip
pip install -r requirements-cibw.txt
python -m pip install -r requirements-cibw.txt
- name: Build wheels
env:
Expand All @@ -42,18 +44,14 @@ jobs:
CIBW_BEFORE_ALL_LINUX: >
yum -y -q --enablerepo=extras install epel-release
&& yum install -y re2-devel ninja-build
&& pip install .
CIBW_REPAIR_WHEEL_COMMAND_LINUX: "LD_LIBRARY_PATH=/usr/lib64:$LD_LIBRARY_PATH auditwheel repair -w {dest_dir} {wheel}"
CIBW_REPAIR_WHEEL_COMMAND_LINUX: "auditwheel show {wheel} && auditwheel repair -w {dest_dir} {wheel}"
CIBW_BEFORE_ALL_MACOS: >
brew install -s re2
&& brew install pybind11 ninja
&& pip install .
brew install re2 pybind11 ninja
CIBW_ENVIRONMENT_MACOS: MACOSX_DEPLOYMENT_TARGET=10.09
CIBW_REPAIR_WHEEL_COMMAND_MACOS: "DYLD_LIBRARY_PATH=/usr/local/Cellar/re2/20201101/lib:$DYLD_LIBRARY_PATH delocate-listdeps {wheel} && delocate-wheel -w {dest_dir} -v {wheel}"
CIBW_REPAIR_WHEEL_COMMAND_MACOS: "pip uninstall -y delocate && pip install git+https://github.com/Chia-Network/delocate.git && delocate-listdeps {wheel} && delocate-wheel -w {dest_dir} -v {wheel}"
CIBW_BEFORE_ALL_WINDOWS: >
vcpkg install re2:x64-windows
&& vcpkg integrate install
&& pip install .
CIBW_ENVIRONMENT_WINDOWS: 'CMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake'
CIBW_TEST_COMMAND: python -c "import re2"
run: |
Expand Down Expand Up @@ -107,7 +105,7 @@ jobs:
tag_name: ${{ env.VERSION }}
name: Release v${{ env.VERSION }}
body_path: CHANGES.md
draft: false
draft: true
prerelease: false
# uncomment below to upload wheels to github releases
# files: ./pyre2*.whl

0 comments on commit f6f7ae8

Please sign in to comment.