-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Add build constraints #13534
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
Open
notatallshaw
wants to merge
22
commits into
pypa:main
Choose a base branch
from
notatallshaw:add-build-constraints
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Add build constraints #13534
Changes from all commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
2e4086e
Implement build constraints
notatallshaw 1aa1d32
Add build constraints tests
notatallshaw db4fcf7
Add build constraints to user guide
notatallshaw d9d5f5d
NEWS ENTRY
notatallshaw 8d170b5
Imply using new behavior when build constraints are provided without …
notatallshaw 9f9032c
Update src/pip/_internal/cli/req_command.py
notatallshaw a9e81d7
Update src/pip/_internal/build_env.py
notatallshaw 4fbafeb
Merge branch 'main' into add-build-constraints
notatallshaw 8943172
Fix linting
notatallshaw ef06010
Fix test
notatallshaw d564457
Consistently use "build constraints" in variables and documentation
notatallshaw ebd55e7
Simplify deprecation warning
notatallshaw c41496e
Only emit pip constraint deprecation warning once
notatallshaw e015f3d
Move `ExtraEnviron` into type checking block
notatallshaw b333b85
Use standard `assert_installed` in functional tests for build constra…
notatallshaw bc48f0b
Eagerly assert build constraints files
notatallshaw fc1bfb5
Add deprecation news item.
notatallshaw 74b08e1
Remove pointless check for `_PIP_IN_BUILD_IGNORE_CONSTRAINTS` in `_de…
notatallshaw 41164aa
Exit `_deprecation_constraint_check` early when build constraints pre…
notatallshaw e53db93
Remove superfluous `constraints` parameter
notatallshaw f372c74
Merge branch 'main' into add-build-constraints
notatallshaw d86d520
Merge branch 'main' into add-build-constraints
notatallshaw File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
Add support for build constraints via the ``--build-constraint`` option. This | ||
allows constraining the versions of packages used during the build process | ||
(e.g., setuptools) without affecting the final installation. |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
Deprecate the ``PIP_CONSTRAINT`` environment variable for specifying build | ||
constraints. | ||
|
||
Build constraints should now be specified using the ``--build-constraint`` | ||
option or the ``PIP_BUILD_CONSTRAINT`` environment variable. When using build | ||
constraints, ``PIP_CONSTRAINT`` no longer affects isolated build environments. | ||
To opt in to this behavior without specifying any build constraints, use | ||
``--use-feature=build-constraint``. |
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
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
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
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.
We should probably issue this deprecation warning only once. In some scenarios, even a single build will trigger this deprecation twice as the build backend can request additional dependencies dynamically.
... although I say that having tried this locally... I can't get the deprecation to be printed twice. Hmm.
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.
Updated, I'm not so sure this prevents it being called in the isolated build sub-process, but it will only be called once per process at least.