From f6f7ae8dae2b71797bfda6c5c7daa0b78fc01595 Mon Sep 17 00:00:00 2001 From: Stephen L Arnold Date: Thu, 14 Jan 2021 20:59:00 -0800 Subject: [PATCH] fix: pkg: update macos wheel repair, simplify wheel building Signed-off-by: Stephen L Arnold --- .github/workflows/main.yml | 14 ++++++-------- .github/workflows/release.yml | 18 ++++++++---------- 2 files changed, 14 insertions(+), 18 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 0d7da3bd..07174e1e 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -12,6 +12,8 @@ jobs: steps: - uses: actions/checkout@v2 + with: + fetch-depth: 0 - uses: actions/setup-python@v2 name: Install Python @@ -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: @@ -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: | diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 09f3e404..0a2f5e35 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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' @@ -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: @@ -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: | @@ -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