build Python wheels with cibuildwheel and add to build workflow#406
build Python wheels with cibuildwheel and add to build workflow#406zacharyburnett wants to merge 7 commits intogoogle:masterfrom
cibuildwheel and add to build workflow#406Conversation
0d9a024 to
06d742f
Compare
cibuildwheelcibuildwheel and test with pytest
cibuildwheel and test with pytestcibuildwheel and test with pytest
|
The current blocking issue with building is that |
7408992 to
dceaa00
Compare
cibuildwheel and test with pytestscikit-build and add to build workflow with cibuildwheel
2cde677 to
d18b525
Compare
| find_package(PythonExtensions REQUIRED) | ||
| add_library(SwigBindings MODULE src/python) | ||
| python_extension_module(SwigBindings) | ||
| install(TARGETS SwigBindings LIBRARY DESTINATION s2geometry) |
There was a problem hiding this comment.
I'm not sure exactly what to put here; this just modifies the example from https://scikit-build.readthedocs.io/en/latest/usage.html#basic-usage
9a6d267 to
79a1be3
Compare
scikit-build and add to build workflow with cibuildwheelscikit-build and add to build workflow
ce3b399 to
344ea65
Compare
|
unfortunately, using |
713b7aa to
07817f3
Compare
7d322e8 to
dfc5b91
Compare
|
building the Python 3.8 wheels for |
bf89cd8 to
ef63bf1
Compare
Since the error is in absl, this is an absl bug, although I think other places in S2 will have this problem. https://github.com/abseil/abseil-cpp#support Support for 10.13 will be dropped in the summer, so I wouldn't worry too much about this one. https://github.com/google/oss-policies-info/blob/main/foundational-cxx-support-matrix.md#macos Why is this only a problem for this PR? We can add before |
ef63bf1 to
78d70e6
Compare
|
Progress! the repair wheel step now fails on macOS with |
af0e69e to
8ee519f
Compare
d9e6506 to
5ed613b
Compare
|
It looks like skipping wheel delocation for macOS lets |
|
testing these wheels locally on macOS ARM, the tests at In order to publish to PyPI, @figroc just needs to configure the PyPI project https://pypi.org/project/s2geometry/ to add this repository ( |
|
I don't know if C++ SWIG can make use of the "Limited API / Stable ABI" (https://docs.cython.org/en/latest/src/userguide/limited_api.html) but if so, that would make it so that only a single wheel would have to be built and published, instead of having to build a wheel for each Python version. But that would probably require changes in |
|
Done
|
| '-DWITH_PYTHON=ON' | ||
| '-DWITH_PYTHON=ON', | ||
| '-DBUILD_TESTS=OFF', | ||
| '-DFETCH_ABSEIL=ON', |
There was a problem hiding this comment.
Hmm. This seems like it could run us into problems with multiple absl verisons.
What shared libs do you end up with?
| needs: [python] | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| id-token: write |
There was a problem hiding this comment.
I need to learn more about these permissions. What's the alternative to putting this in a workflow?
There was a problem hiding this comment.
this is to use Trusted Publishers with PyPI, see here: https://docs.github.com/en/actions/how-tos/secure-your-work/security-harden-deployments/oidc-in-pypi
from what I understand, after authenticating via OIDC, the workflow exchanges the token for a single-use PyPI publish token that it then uses to upload the wheels
Yes, it does. I'll see about adding this separately. |
a195a42 to
f82e67e
Compare
Added in 0b302d5 |
add comment for min macOS pin
add comment for skipping wheel delocation on macOS
f82e67e to
e2311d5
Compare
| [project.optional-dependencies] | ||
| [dependency-groups] | ||
| test = [ | ||
| "pytest", | ||
| ] |
There was a problem hiding this comment.
minor change: project.optional-dependencies are more for "features" visible to the user (they could do pip install s2geometry[test]); using dependency-groups denotes this as dependency for devs instead (install with pip install --group test)
closes #389,
blocked by #390[fixed]