-
Notifications
You must be signed in to change notification settings - Fork 802
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
Add cibuildwheel
workflow
#2029
base: develop
Are you sure you want to change the base?
Conversation
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.
This is incredible! I left some comments, but main request is to rebrand to gtsam-develop and have merge commit hashes rather than dates. The base version of course should be in there as well. We are “pre-4.3”, so I guess GTSAM-develop.4.3.HASHHHH or something.
maybe find some docs on using commit hashes to see if it is standard practice somewhere, so in the docs (add a README file?) we can refer to that.
CMakeLists.txt
Outdated
@@ -10,10 +10,16 @@ set (GTSAM_VERSION_PATCH 0) | |||
set (GTSAM_PRERELEASE_VERSION "a0") | |||
math (EXPR GTSAM_VERSION_NUMERIC "10000 * ${GTSAM_VERSION_MAJOR} + 100 * ${GTSAM_VERSION_MINOR} + ${GTSAM_VERSION_PATCH}") | |||
|
|||
if ("${GTSAM_PRERELEASE_VERSION}" STREQUAL "") | |||
if (DEFINED ENV{NIGHTLY}) |
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 think we need to maybe re-brand to gtsam-develop, as in our slack discussion.
CMakeLists.txt
Outdated
@@ -10,10 +10,16 @@ set (GTSAM_VERSION_PATCH 0) | |||
set (GTSAM_PRERELEASE_VERSION "a0") | |||
math (EXPR GTSAM_VERSION_NUMERIC "10000 * ${GTSAM_VERSION_MAJOR} + 100 * ${GTSAM_VERSION_MINOR} + ${GTSAM_VERSION_PATCH}") | |||
|
|||
if ("${GTSAM_PRERELEASE_VERSION}" STREQUAL "") | |||
if (DEFINED ENV{NIGHTLY}) | |||
string(TIMESTAMP NOW "%Y.%m.%d.%H.%M") |
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.
And make this the PR merge commit hash
Ah, finally something from PyPa that does all the stuff we had to do in |
Also please check the built macOS wheels locally if they work. |
@dellaert It looks like having the Git commit hash in the version string may not be possible. See the PyPA docs. It seems that version specifiers must comply with the format
What do you think about the versioning scheme |
That works. Maybe make sure then that you always use 2 digits for the month. E.g., |
What is this PR?
This PR introduces a new pipeline that uses
cibuildwheel
to build platform-dependent python wheels. This is the PyPA recommended way for building compliant Python wheels across platforms.Why modify
has_ext_modules()
in thedistclass
?has_ext_modules()
is called bysetuptools
to indentify if the built wheel is a pure-Python wheel or a platform-dependent wheel. However,has_ext_modules()
only returns True if theext_modules
parameter is defined with the source C/C++ files to build. However, we pre-build our C++ library prior to building the wheel. Thus, we need to forcehas_ext_modules()
to return True by overwriting it.Note: This workflow is currently only set up to target

Linux x86_64
architectures. However, since it is usingcibuildwheel
it can easily be extended to other architectures (such as Linux ARM). See the below image from thecibuildwheel
docs.cc @dellaert @akshay-krishnan @truher @ProfFan as interested parties :)