- 
                Notifications
    You must be signed in to change notification settings 
- Fork 3.2k
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
          
     Merged
      
      
    
      
        
          +525
        
        
          −17
        
        
          
        
      
    
  
  
     Merged
                    Add build constraints #13534
Changes from all commits
      Commits
    
    
            Show all changes
          
          
            32 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 05aeb84
              
                Merge branch 'main' into add-build-constraints
              
              
                notatallshaw 4c04652
              
                Merge branch 'main' into add-build-constraints
              
              
                notatallshaw ab36b15
              
                Merge branch 'main' into add-build-constraints
              
              
                notatallshaw d8f372c
              
                Use with to close pip session.
              
              
                notatallshaw d0cf197
              
                Remove deprication supression logic
              
              
                notatallshaw b091be2
              
                Update tests
              
              
                notatallshaw aa5fcd9
              
                Merge branch 'main' into add-build-constraints
              
              
                notatallshaw d0bcf5c
              
                fix lint
              
              
                notatallshaw 11676b0
              
                Merge branch 'main' into add-build-constraints
              
              
                notatallshaw 035396d
              
                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
          Some comments aren't visible on the classic Files Changed page.
        
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
    
  
  
    
              
              
  
    
      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.
        
    
  
  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.
  
    
  
    
Uh oh!
There was an error while loading. Please reload this page.