-
Notifications
You must be signed in to change notification settings - Fork 179
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[python] Scikit-build-core driven wheel creation #1454
[python] Scikit-build-core driven wheel creation #1454
Conversation
fc92105
to
bb33c6d
Compare
Ok. I'm being silly, I literally wrote that this won't work here due to the "v6.0.0-nightly" tag.
If you kindly push a tag called "v6.0.0.dev0" and rerun the wheels action everything should 🤞 be good. |
Hi, thanks so much for your PR, especially the great documentation of all issues. For me it's ok, not to ship the compiled protos. We will try to retag with an alpha tag. But to my understanding, shouldn't 'v6.0.0-nightly' still be semver compliant? |
Yup, this took a lot longer than I expected too, but worth it.
Yes, but its not Python version specification compliant. |
5fd545c
to
ffb4802
Compare
@KerstinKeller Do you need anything further from me here? Everything is passing green now with the new tag (thank you!) except the cherry picker due to the missing label. If some pytests would lighten the validation load for you all and help get this merged I can do that, no problem. |
Sorry I was really busy last week. The PR looks already really good. We wanted to do some lokal tests before merging. |
One more quick question: is there a reason that the ubuntu builds are done on Ubuntu 20.04 which is soon going to be deprecated. I think cibuildwheel will execute the actual build in a docker container? Or did I get something wrong here? |
Correct. cibuildwheel does all build in manylinux docker containers. https://cibuildwheel.pypa.io/en/stable/#how-it-works Will update to ubuntu-latest and windows-latest as it shouldn't affect anything 😄 |
No worries. Yes, the tests would run as part of cibuildwheel for every wheel |
I tested the whl files for Windows Python 3.9 and Ubuntu 22.04 Python 3.10 and everything worked out of the box. I tested the HelloWorld and HelloWorld Protobuf sample from the documentation. The systems were clean and didn't have eCAL installed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added two remarks, but I think they should prevent us from merging the PR.
@@ -159,7 +158,18 @@ option(CPACK_PACK_WITH_INNOSETUP "Create Innosetup installer for t | |||
|
|||
set(ECAL_INSTALL_PYTHON_DIR "bin" CACHE PATH "Location to install the Python extension modules. Might be set by setupdtools install.") | |||
|
|||
set(ECAL_BUILD_VERSION "0.0.0" CACHE STRING "Inject a build version if not building from a git repository") | |||
if(DEFINED SKBUILD_PROJECT_VERSION) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not a 100% friend of this, i'd prefer if the build could just inject ECAL_BUILD_VERSION
from the outside.
But this may be cleaned up later on
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As far as I could tell, this is the only way to get the package version from setuptools-scm into CMake, let scikit-core handle it.
Hi @DownerCase, I tried to build the python wheel locally on my PC and realized that I have no idea how to do that. Is there a guide somewhere how that can be done? |
There are a few methods but I do python -m pip install build
python -m build cibuildwheels can also be run locally if you desire. |
Thanks, works like a charm! Currently, we have the following python packages:
I checked whether I can reuse the old scripts to generate the .deb packages and that did not work (as expected). While I wouldn't really mind dropping the amd64 .deb installers as those users can switch to the manylinux pypi packages, I would still like to offer the arm64 users a way to install the python binding. So, do you by any chance know how to In the past I used the following script for generating the deb package:
|
Yes! cibuildwheel can do it: docs. I'll set that up here too
That is outside of my knowledge. Theoretically that method could work on new enough versions of pip to support the build backend standard. You may need to add the minimal stub setup.py. |
df3ebdd
to
698ce8a
Compare
Yikes, building arm64 in emulation is really slow. I had a quick look at your deb situation, doesn't look great. For a start you'd be needing to disable the RPATH/install shenanigans as you'd want to depend on the system library from the main eCAL apt package. |
Hmm. Over an hour to get all green CI ticks is unacceptable. Will rework to only trigger the emulated compilation on releases? IMO, I only need to beat the 37m windows build for daily PR workflows. |
Is there a way to have them trigger on releases and on "manual trigger" or something similar? I was also thinking about the same thing. |
Theoretically I've done just that now 😄 It's set to only do the arm64 wheels on (pre-)releases being published or when the workflow is manually started. |
Properly handling the protobuf bindings in Python is very challenging. So for now it has been removed, users may fetch the proto files from the repo and generate the bindings themselves if needed.
83d9da3
to
eed19a3
Compare
Description
Python wheels are now built via scikit-build-core! 🎉
This work is based off of Kerstin's attempt a few months ago.
You should have write permissions to this branch if you wish to make modifications 😄
Changes of this PR:
Removed
BUILD_STANDALONE_PY_WHEEL
as it's not longer neededecal_python_functions.cmake
as no functions from it are used nowUpdated
install
commandDevelopment.Module
component is strictly required for this workflow.BUILD_PY_BINDING
is on.SKBUILD_PROJECT_VERSION
CMake variable, this is the only change to the CMake scripts that interacts with scikit-build-core.Added
_version.py
file containing the package version informationpython
component which has to be explicitly listed to CPack to be installed.Identified issues:
setuptools-scm which provides the dynamic version metadata rejects the
v6.0.0-nightly
tag.v6.0.0.dev0
tag to mark "start of v6 development". The tools were happy with that.How to handle the protobuf bindings.
The wheel includes multiple versioned SO's on Linux, namely the SOVERSION one and the VERSION one. Eg:
libecal_core.so.6
andlibecal_core.so.6.0.0
libhdf5.so.103.4.1
andlibhdf5.103
*.so.*.*.*
from the wheel?cibuildwheel has been restricted to one architecture type (64-bit) as otherwise the second architecture to get built has linking problems
cibuildwheel does not build musl wheels. eCAL does not compile with musl libc.
Related issues
Related but may not close: