Skip to content

build Python wheels with cibuildwheel and add to build workflow - #406

Merged
jmr merged 12 commits into
google:masterfrom
zacharyburnett:python_wheels
Apr 22, 2026
Merged

jmr merged 12 commits into
google:masterfrom
zacharyburnett:python_wheels

Conversation

@zacharyburnett

@zacharyburnett zacharyburnett commented Jan 26, 2025 •

Copy link
Copy Markdown
Contributor

closes #389, blocked by #390 [fixed]

@zacharyburnett zacharyburnett changed the title build Python wheels with cibuildwheel build Python wheels with cibuildwheel and test with pytest Jan 29, 2025
@zacharyburnett zacharyburnett changed the title build Python wheels with cibuildwheel and test with pytest automatically build Python wheels with cibuildwheel and test with pytest Jan 29, 2025
@zacharyburnett

zacharyburnett commented Jan 29, 2025 •

Copy link
Copy Markdown
Contributor Author

The current blocking issue with building is that repairwheel can't find the C extension in the built wheel. Perhaps it is not included for some reason, maybe an issue with the setuptools config:

Repairing wheel...

    + sh -c 'auditwheel repair -w /tmp/cibuildwheel/repaired_wheel /tmp/cibuildwheel/built_wheel/s2geometry-0.0.0-cp37-cp37m-linux_x86_64.whl'
INFO:auditwheel.main_repair:Repairing s2geometry-0.0.0-cp37-cp37m-linux_x86_64.whl
INFO:auditwheel.main_repair:This does not look like a platform wheel, no ELF executable or shared library file (including compiled Python C extension) found in the wheel archive

@zacharyburnett
zacharyburnett force-pushed the python_wheels branch 2 times, most recently from 7408992 to dceaa00 Compare June 16, 2025 17:30
Comment thread pyproject.toml
@zacharyburnett zacharyburnett changed the title automatically build Python wheels with cibuildwheel and test with pytest build Python wheels with scikit-build and add to build workflow with cibuildwheel Apr 10, 2026
Comment thread CMakeLists.txt Outdated
@zacharyburnett
zacharyburnett force-pushed the python_wheels branch 7 times, most recently from 9a6d267 to 79a1be3 Compare April 10, 2026 14:45
@zacharyburnett zacharyburnett changed the title build Python wheels with scikit-build and add to build workflow with cibuildwheel build Python wheels with scikit-build and add to build workflow Apr 10, 2026
@zacharyburnett
zacharyburnett force-pushed the python_wheels branch 7 times, most recently from ce3b399 to 344ea65 Compare April 10, 2026 15:44
@zacharyburnett

zacharyburnett commented Apr 10, 2026 •

Copy link
Copy Markdown
Contributor Author

unfortunately, using scikit-build still fails to provide the s2geometry module:

Run source .venv/bin/activate && python -c "import s2geometry"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
    import s2geometry
ModuleNotFoundError: No module named 's2geometry'

@zacharyburnett
zacharyburnett force-pushed the python_wheels branch 3 times, most recently from 713b7aa to 07817f3 Compare April 17, 2026 14:51
Comment thread pyproject.toml
Comment thread src/s2geometry/include/absl/algorithm/algorithm.h Outdated
Comment thread .github/workflows/build.yml
Comment thread pyproject.toml Outdated
@zacharyburnett

Copy link
Copy Markdown
Contributor Author

thank you for being so patient as I iterated over this. I'm excited to start using this in our applications!

@jmr

jmr commented Apr 22, 2026

Copy link
Copy Markdown
Member

thank you for being so patient as I iterated over this.

Thanks for figuring this out!

I'm excited to start using this in our applications!

I'll do a new release, hopefully later this week.

@jmr
jmr merged commit c24b368 into google:master Apr 22, 2026
13 checks passed
@zacharyburnett
zacharyburnett deleted the python_wheels branch April 22, 2026 20:08
@jmr

jmr commented Apr 23, 2026

Copy link
Copy Markdown
Member

@jmr

jmr commented Apr 23, 2026

Copy link
Copy Markdown
Member

@figroc

figroc commented Apr 23, 2026 •

Copy link
Copy Markdown

failed: https://github.com/google/s2geometry/actions/runs/24833778811/job/72692695440

@figroc @zacharyburnett

I've already add this repo (https://github.com/google/s2geometry) as alternate repository location in pypi project. Am I missing some configs? @zacharyburnett

Or should I transfer the pypi project to some account? @jmr

@zacharyburnett

zacharyburnett commented Apr 23, 2026 •

Copy link
Copy Markdown
Contributor Author

failed: https://github.com/google/s2geometry/actions/runs/24833778811/job/72692695440
@figroc @zacharyburnett

I've already add this repo (https://github.com/google/s2geometry) as alternate repository location in pypi project. Am I missing some configs? @zacharyburnett

Or should I transfer the pypi project to some account? @jmr

just to confirm, you added this github repo URL to the Trusted Publishers at https://pypi.org/manage/project/s2geometry/settings/publishing/ right?

it should have these values when filled out (google, s2geometry, build.yml, pypi):
image

Transferring the PyPI project also works! I don't know @jmr's PyPI username (if they have one), but if it's okay with @jmr my PyPI username is zacharyburnett and I can configure it

@figroc

figroc commented Apr 23, 2026

Copy link
Copy Markdown

just to confirm, you added this github repo URL to the Trusted Publishers at https://pypi.org/manage/project/s2geometry/settings/publishing/ right?

it should have these values when filled out (google, s2geometry, build.yml, pypi):

image

Transferring the PyPI project also works! I don't know @jmr's PyPI username (if they have one), but if it's okay with @jmr my PyPI username is zacharyburnett and I can configure it

ok... I added to the wrong place. Now it should be good to go.

@jmr

jmr commented Apr 23, 2026

Copy link
Copy Markdown
Member

seems to work now: https://pypi.org/project/s2geometry/

@figroc figroc mentioned this pull request Apr 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Use cibuildwheel for Python CI

4 participants