Skip to content

Commit

Permalink
enable delocate to fix the macos wheels
Browse files Browse the repository at this point in the history
  • Loading branch information
laurynasas committed Aug 19, 2021
1 parent c711050 commit 59bafd6
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 16 deletions.
13 changes: 5 additions & 8 deletions .github/workflows/release_wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,7 @@ jobs:
- os: macos-10.15
name: mac
cibw:
build: "cp36* cp37* cp38*"
- os: macos-10.15
name: mac-arm
cibw:
arch: universal2
build: "cp39*"
build: "cp36* cp37* cp38* cp39*"
- os: ubuntu-20.04
name: manylinux2014
cibw:
Expand All @@ -36,8 +31,10 @@ jobs:
CIBW_BUILD: "${{ matrix.cibw.build || '*' }}"
CIBW_ARCHS: "${{ matrix.cibw.arch || 'auto' }}"
CIBW_MANYLINUX_X86_64_IMAGE: "${{ matrix.cibw.manylinux_image }}"
CIBW_BEFORE_BUILD_MACOS: "brew install libomp"
CIBW_REPAIR_WHEEL_COMMAND_MACOS: ""
CIBW_BEFORE_BUILD_MACOS: "brew install libomp llvm"
CIBW_REPAIR_WHEEL_COMMAND_MACOS: "delocate-listdeps {wheel} && delocate-wheel --verbose --require-archs {delocate_archs} -w {dest_dir} {wheel}"
# to install latest delocate package
CIBW_DEPENDENCY_VERSIONS: "latest"
# due to package and module name conflict have to temporarily move it away to run tests
CIBW_BEFORE_TEST: "mv {package}/qsimcirq /tmp"
CIBW_TEST_COMMAND: "pytest {package}/qsimcirq_tests/qsimcirq_test.py && mv /tmp/qsimcirq {package}"
Expand Down
13 changes: 5 additions & 8 deletions .github/workflows/testing_wheels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,7 @@ jobs:
- os: macos-10.15
name: mac
cibw:
build: "cp36* cp37* cp38*"
- os: macos-10.15
name: mac-arm
cibw:
arch: universal2
build: "cp39*"
build: "cp36* cp37* cp38* cp39*"
- os: ubuntu-20.04
name: manylinux2014
cibw:
Expand All @@ -41,8 +36,10 @@ jobs:
CIBW_BUILD: "${{ matrix.cibw.build || '*' }}"
CIBW_ARCHS: "${{ matrix.cibw.arch || 'auto' }}"
CIBW_MANYLINUX_X86_64_IMAGE: "${{ matrix.cibw.manylinux_image }}"
CIBW_BEFORE_BUILD_MACOS: "brew install libomp"
CIBW_REPAIR_WHEEL_COMMAND_MACOS: ""
CIBW_BEFORE_BUILD_MACOS: "brew install libomp llvm"
CIBW_REPAIR_WHEEL_COMMAND_MACOS: "delocate-listdeps {wheel} && delocate-wheel --verbose --require-archs {delocate_archs} -w {dest_dir} {wheel}"
# to install latest delocate package
CIBW_DEPENDENCY_VERSIONS: "latest"
# due to package and module name conflict have to temporarily move it away to run tests
CIBW_BEFORE_TEST: "mv {package}/qsimcirq /tmp"
CIBW_TEST_COMMAND: "pytest {package}/qsimcirq_tests/qsimcirq_test.py && mv /tmp/qsimcirq {package}"
Expand Down

0 comments on commit 59bafd6

Please sign in to comment.