Merge pull request #1675 from pypa/pip-constraints-fix

fix: Don't override PIP_CONSTRAINT if set by the user
This commit is contained in:
Joe Rickerby
2024-03-09 13:53:32 +00:00
committed by GitHub
4 changed files with 61 additions and 3 deletions
+5 -1
View File
@@ -407,7 +407,11 @@ def build(options: Options, tmp_path: Path) -> None:
config.version
)
)
build_env["PIP_CONSTRAINT"] = constraint_path.as_uri()
user_constraints = build_env.get("PIP_CONSTRAINT")
our_constraints = constraint_path.as_uri()
build_env["PIP_CONSTRAINT"] = " ".join(
c for c in [user_constraints, our_constraints] if c
)
build_env["VIRTUALENV_PIP"] = get_pip_version(env)
call(
"python",