PythonPackage: add --config-settings support#31823
Merged
becker33 merged 3 commits intospack:developfrom Aug 9, 2022
Merged
Conversation
9b311d8 to
6e3dfce
Compare
6e3dfce to
46b8d41
Compare
becker33
approved these changes
Aug 9, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
@rgommers taught me about a new
pip installflag we'll want to use withpy-scipy. Here is my understanding of the history of this flag (@pradyunsg please correct me if I'm wrong, I'm probably oversimplifying things):pip installwas simply a wrapper aroundpython setup.py install. If you wanted to pass extra options to the build, you could usepip install --global-option=<global> --install-option=<install>, which would in turn runpython setup.py <global> install <install>.python setup.py install, if abuild-backendis specified inpyproject.toml, it is invoked directly. However, there was no way to pass options to a build backend.--config-settingsflag to pip (first available in 22.1 release) which allows you to pass extra options to the build backend.There is one important thing to note about this flag. It was first added in pip 22.1, which only supports Python 3.7+. This means that any package we add
config_settingsto will only support Python 3.7+. Forpy-scipy, we will only add this flag to scipy 1.9+, which already only supports Python 3.7+, so there's no issue there. But for other packages which specify abuild-backendinpyproject.toml, this raises the question of which Python versions we are willing to support. Opened #31824 to discuss this without getting side-tracked with this PR.