style improvements from code review

This commit is contained in:
Joe Rickerby
2024-03-02 18:16:20 +00:00
parent d65d46ca24
commit 6940c77cd3
2 changed files with 9 additions and 4 deletions
+4 -2
View File
@@ -409,8 +409,10 @@ def build(options: Options, tmp_path: Path) -> None:
config.version
)
)
build_env["PIP_CONSTRAINT"] = (
constraint_path.as_uri() + " " + build_env.get("PIP_CONSTRAINT", "")
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(
+5 -2
View File
@@ -455,9 +455,12 @@ def build(options: Options, tmp_path: Path) -> None:
tmp_file.write_bytes(constraints_path.read_bytes())
constraints_path = tmp_file
build_env["PIP_CONSTRAINT"] = (
str(constraints_path) + " " + build_env.get("PIP_CONSTRAINT", "")
our_constraints = str(constraints_path)
user_constraints = build_env.get("PIP_CONSTRAINT")
build_env["PIP_CONSTRAINT"] = " ".join(
c for c in [our_constraints, user_constraints] if c
)
build_env["VIRTUALENV_PIP"] = get_pip_version(env)
call(
"python",