Skip to content

Commit 09eae89

Browse files
author
zacharyburnett
committed
try using cibuildwheel
1 parent f97d130 commit 09eae89

File tree

2 files changed

+20
-40
lines changed

2 files changed

+20
-40
lines changed

.github/workflows/build.yml

Lines changed: 6 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -47,53 +47,19 @@ jobs:
4747
# macos-13 is an intel runner, macos-14 is apple silicon
4848
- macos-13
4949
- macos-latest
50-
python-version:
51-
- "3.8"
52-
- "3.9"
53-
- "3.10"
54-
- "3.11"
55-
- "3.12"
56-
- "3.13"
57-
exclude:
58-
# importing the package from the wheel instantly segfaults on macOS Python <= 3.12
59-
- runs-on: macos-latest
60-
python-version: "3.8"
61-
- runs-on: macos-latest
62-
python-version: "3.9"
63-
- runs-on: macos-latest
64-
python-version: "3.10"
65-
- runs-on: macos-latest
66-
python-version: "3.11"
67-
- runs-on: macos-latest
68-
python-version: "3.12"
69-
- runs-on: macos-13
70-
python-version: "3.8"
71-
- runs-on: macos-13
72-
python-version: "3.9"
73-
- runs-on: macos-13
74-
python-version: "3.10"
75-
- runs-on: macos-13
76-
python-version: "3.11"
77-
- runs-on: macos-13
78-
python-version: "3.12"
7950
fail-fast: false
8051
runs-on: ${{ matrix.runs-on }}
8152
timeout-minutes: 30
8253
steps:
83-
- uses: zacharyburnett/setup-abseil-cpp@de39f445295c887839e30c864ffbbb1c0231bc83 # 1.0.5
84-
with:
85-
cmake-build-args: "-DCMAKE_CXX_STANDARD=17 -DABSL_PROPAGATE_CXX_STD=ON -DABSL_ENABLE_INSTALL=ON -DBUILD_TESTING=off -DCMAKE_POSITION_INDEPENDENT_CODE=ON"
86-
abseil-version: "20240722.0"
8754
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
88-
- uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0
55+
- uses: pypa/cibuildwheel@ee63bf16da6cddfb925f542f2c7b59ad50e93969 # v2.22.0
8956
with:
90-
python-version: ${{ matrix.python-version }}
91-
- run: pip install build repairwheel
92-
- run: python -m build -w
93-
- run: repairwheel ./dist/*.whl -o ./dist/delocated/
57+
package-dir: .
58+
output-dir: dist/
59+
config-file: "{package}/pyproject.toml"
9460
- uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3
9561
with:
96-
name: s2geometry-py${{ matrix.python-version }}-${{ runner.os }}-${{ runner.arch }}
97-
path: ./dist/delocated/*.whl
62+
name: s2geometry-${{ runner.os }}-${{ runner.arch }}
63+
path: ./dist/*.whl
9864
- if: (github.event_name == 'release') && (github.event.action == 'released')
9965
uses: pypa/gh-action-pypi-publish@15c56dba361d8335944d31a2ecd17d700fc7bcbc # v1.12.2

pyproject.toml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,3 +57,17 @@ namespaces = false
5757
[tool.setuptools.package-dir]
5858
"" = "src"
5959

60+
[tool.cibuildwheel]
61+
test-requires = "pytest"
62+
test-command = "pytest {project}/tests"
63+
64+
[tool.cibuildwheel.linux]
65+
# repair-wheel-command = "auditwheel repair -w {dest_dir} {wheel}"
66+
before-all = "yum makecache --refresh && yum update && yum install gflags-devel glog-devel gtest-devel openssl-devel abseil-cpp"
67+
68+
69+
[tool.cibuildwheel.macos]
70+
# repair-wheel-command = "delocate-wheel --require-archs {delocate_archs} -w {dest_dir} -v {wheel}"
71+
before-all = "brew install gflags glog openssl abseil"
72+
73+

0 commit comments

Comments
 (0)