-
Notifications
You must be signed in to change notification settings - Fork 314
Refactor setup.py for cmake updates (old branch) #955
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
Refactor setup.py for cmake updates (old branch) #955
Conversation
Codecov Report
@@ Coverage Diff @@
## master #955 +/- ##
==========================================
- Coverage 85.75% 85.63% -0.12%
==========================================
Files 191 191
Lines 18098 18160 +62
Branches 2046 2061 +15
==========================================
+ Hits 15520 15552 +32
- Misses 2055 2085 +30
Partials 523 523
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
|
For windows, I'm pretty certain we need to at least pull: and: https://github.com/pybind/cmake_example/blob/6de957d06a372a7b106e5e3b8e29b97a8ec3afc7/setup.py#L73 And replace this: @meshula notes:
|
|
this is a pretty substantial change to the setup.py (but one that looks good!). could we break the cmake setup.py stuff out away from the cibuildwheel stuff? |
ssteinbach
left a comment
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 I'd prefer if we could break this into two PRs - one for the setup.py changes and one for the python-wheels/cibuildwheel action addition that follows it.
|
Sure, I could make the first one be "properly target build output from setup.py" and then make the second one be adding the action and publishing the wheel artifacts. |
|
Oh, it also looks like I may have branched from an old commit. I'll rebase and split. |
|
Great, thanks @reinecke. |
meshula
left a comment
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.
Great to see! Very happy to have wheels built as an action.
…e wheel build directory
… into the wheel build directory" This reverts commit db96069.
…specified by setuptools and allow it to handle the final install dir. This allows setuptools to handle targeting the final install using products of the intermediate install.
… from somewhere else) and trued up setuptools and pip with the versions enforced in setup.py
…with 32/64-bit issues.
…behavior more explicit
c6a965a to
b72a1fe
Compare
Refactors
setup.pyto properly leverage the newly cleaned up cmake builds (reworked in #837).Summarize your change.
Our
setup.pyhad been arranged to try and figure out the final install location for for the libraries and place products in there. The python packaging utilities actually want you to assemble your build into a temp location where it will then pick it up to either package or install to the proper place.This refactor now tells the cmake build to install into that temp location. Because of this, we have to manually maintain much less code that supports determining the user's desired end action with the assembled package (e.x. install, install using --user, bdist, bdist_wheel).
Also removed
_Ctxclass instance that was storing build config as a global - it made it hard to follow the flow of code and would likely be prone to bugs.