From b8395f71be4e81ad8fc538108fb9c070605cd889 Mon Sep 17 00:00:00 2001 From: SomberNight Date: Sat, 13 Mar 2021 14:53:41 +0100 Subject: [PATCH] contrib: freeze_packages should pin latest pip/etc if possible We've already been pinning pip/setuptools/wheel; it is `pip freeze --all` (the "--all" arg) that does that. This change just tries to ensure that we pin the latest version when possible. Previously if e.g. "pip" was not pulled in by any package in "requirements${i}.txt", we would just pin whatever is installed locally. --- contrib/freeze_packages.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/contrib/freeze_packages.sh b/contrib/freeze_packages.sh index 53ecc7c53..8782056fe 100755 --- a/contrib/freeze_packages.sh +++ b/contrib/freeze_packages.sh @@ -28,6 +28,12 @@ for i in '' '-hw' '-binaries' '-binaries-mac' '-build-wine' '-build-mac' '-build echo "Installing dependencies... (requirements${i}.txt)" + # We pin all python packaging tools (pip and friends). Some of our dependencies might + # pull some of them in (e.g. protobuf->setuptools), and all transitive dependencies + # must be pinned, so we might as well pin all packaging tools. This however means + # that we should explicitly install them now, so that we pin latest versions if possible. + python -m pip install --upgrade pip setuptools wheel + python -m pip install -r "$contrib/requirements/requirements${i}.txt" --upgrade echo "OK."