Skip to content

Commit

Permalink
Update appenv: Freeze all relevant packages
Browse files Browse the repository at this point in the history
  • Loading branch information
elikoga committed Aug 20, 2024
1 parent ec76991 commit 94b55ff
Showing 1 changed file with 3 additions and 12 deletions.
15 changes: 3 additions & 12 deletions appenv.py
Original file line number Diff line number Diff line change
Expand Up @@ -564,12 +564,6 @@ def reset(self, args=None, remaining=None):

def update_lockfile(self, args=None, remaining=None):
ensure_minimal_python()
preferences = parse_preferences()
python312_mixed_setuptools_workaround = False
if preferences is not None:
if any(f"3.{x}" in preferences for x in range(4, 12)):
if any(f"3.{x}" in preferences for x in range(12, 20)):
python312_mixed_setuptools_workaround = True
os.chdir(self.base)
print("Updating lockfile")
tmpdir = os.path.join(self.appenv_dir, "updatelock")
Expand All @@ -580,12 +574,9 @@ def update_lockfile(self, args=None, remaining=None):
pip(tmpdir, ["install", "-r", "requirements.txt"])

extra_specs = []
pip_freeze_args = ["freeze"]
if python312_mixed_setuptools_workaround:
pip_freeze_args.extend(["--all", "--exclude", "pip"])
result = pip(tmpdir, pip_freeze_args, merge_stderr=False).decode(
"ascii"
)
result = pip(
tmpdir, ["freeze", "--all", "--exclude", "pip"], merge_stderr=False
).decode("ascii")
# They changed this behaviour in https://github.com/pypa/pip/pull/12032
pinned_versions = {}
for line in result.splitlines():
Expand Down

0 comments on commit 94b55ff

Please sign in to comment.