-
Notifications
You must be signed in to change notification settings - Fork 273
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 to build and stage into temp area for setup.py to install from #956
Refactor setup.py to build and stage into temp area for setup.py to install from #956
Conversation
…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
Codecov Report
@@ Coverage Diff @@
## master #956 +/- ##
=======================================
Coverage 85.63% 85.63%
=======================================
Files 191 191
Lines 18160 18160
Branches 2061 2061
=======================================
Hits 15552 15552
Misses 2085 2085
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.
|
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.
One note about vs 2017 vs 2019 and a formatting note suggestion to match the rest of the file. Thanks!
…ter clarify intent for our future selves
When some hacks are removed from a setup.py file, it makes me extremely happy 😁 Great work! |
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 looks great. Anything else you want to change on this? Or is it ready to land?
Let's land this one and move on! I'll do it now. |
Refactors
setup.py
to properly leverage the newly cleaned up cmake builds (reworked in #837).(Note: this replaces #955 that wouldn't reopen due to GitHub oddness)
Summarize your change.
Our
setup.py
had 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).
Other changes include:
_Ctx
class 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.-jx
flag generation to be based on detected number of system CPUs (better compile speeds!)