Skip to content

Commit 59bafd6

Browse files
committed
enable delocate to fix the macos wheels
1 parent c711050 commit 59bafd6

File tree

2 files changed

+10
-16
lines changed

2 files changed

+10
-16
lines changed

.github/workflows/release_wheels.yml

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,7 @@ jobs:
1515
- os: macos-10.15
1616
name: mac
1717
cibw:
18-
build: "cp36* cp37* cp38*"
19-
- os: macos-10.15
20-
name: mac-arm
21-
cibw:
22-
arch: universal2
23-
build: "cp39*"
18+
build: "cp36* cp37* cp38* cp39*"
2419
- os: ubuntu-20.04
2520
name: manylinux2014
2621
cibw:
@@ -36,8 +31,10 @@ jobs:
3631
CIBW_BUILD: "${{ matrix.cibw.build || '*' }}"
3732
CIBW_ARCHS: "${{ matrix.cibw.arch || 'auto' }}"
3833
CIBW_MANYLINUX_X86_64_IMAGE: "${{ matrix.cibw.manylinux_image }}"
39-
CIBW_BEFORE_BUILD_MACOS: "brew install libomp"
40-
CIBW_REPAIR_WHEEL_COMMAND_MACOS: ""
34+
CIBW_BEFORE_BUILD_MACOS: "brew install libomp llvm"
35+
CIBW_REPAIR_WHEEL_COMMAND_MACOS: "delocate-listdeps {wheel} && delocate-wheel --verbose --require-archs {delocate_archs} -w {dest_dir} {wheel}"
36+
# to install latest delocate package
37+
CIBW_DEPENDENCY_VERSIONS: "latest"
4138
# due to package and module name conflict have to temporarily move it away to run tests
4239
CIBW_BEFORE_TEST: "mv {package}/qsimcirq /tmp"
4340
CIBW_TEST_COMMAND: "pytest {package}/qsimcirq_tests/qsimcirq_test.py && mv /tmp/qsimcirq {package}"

.github/workflows/testing_wheels.yml

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,7 @@ jobs:
2020
- os: macos-10.15
2121
name: mac
2222
cibw:
23-
build: "cp36* cp37* cp38*"
24-
- os: macos-10.15
25-
name: mac-arm
26-
cibw:
27-
arch: universal2
28-
build: "cp39*"
23+
build: "cp36* cp37* cp38* cp39*"
2924
- os: ubuntu-20.04
3025
name: manylinux2014
3126
cibw:
@@ -41,8 +36,10 @@ jobs:
4136
CIBW_BUILD: "${{ matrix.cibw.build || '*' }}"
4237
CIBW_ARCHS: "${{ matrix.cibw.arch || 'auto' }}"
4338
CIBW_MANYLINUX_X86_64_IMAGE: "${{ matrix.cibw.manylinux_image }}"
44-
CIBW_BEFORE_BUILD_MACOS: "brew install libomp"
45-
CIBW_REPAIR_WHEEL_COMMAND_MACOS: ""
39+
CIBW_BEFORE_BUILD_MACOS: "brew install libomp llvm"
40+
CIBW_REPAIR_WHEEL_COMMAND_MACOS: "delocate-listdeps {wheel} && delocate-wheel --verbose --require-archs {delocate_archs} -w {dest_dir} {wheel}"
41+
# to install latest delocate package
42+
CIBW_DEPENDENCY_VERSIONS: "latest"
4643
# due to package and module name conflict have to temporarily move it away to run tests
4744
CIBW_BEFORE_TEST: "mv {package}/qsimcirq /tmp"
4845
CIBW_TEST_COMMAND: "pytest {package}/qsimcirq_tests/qsimcirq_test.py && mv /tmp/qsimcirq {package}"

0 commit comments

Comments
 (0)