Skip to content

Commit eb92232

Browse files
committed
fix(deps): raise pip before the hashed lock install
pip before 23.3 does not match a pin with extras, such as googleapis-common-protos[grpc]==X, against a plain request for the same package. It then takes the plain package from the index and fails the --require-hashes check. Ubuntu 22.04 gives pip 22.0.2, so the dev image failed. A pin to pip 25.2 first lets pip-compile output install as generated. It also removes the need for the hand-added pin in requirements-common_lock.txt. Signed-off-by: Vitor Bandeira <vvbandeira@precisioninno.com>
1 parent fe0e49e commit eb92232

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

‎etc/DependencyInstaller.sh‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ cd "${_script_dir}/../"
1414

1515
# package versions
1616
klayoutVersion=0.30.7
17+
# pip 23.3 is the first release that matches an extras-bearing pin such as
18+
# googleapis-common-protos[grpc]==X against a plain request for the same
19+
# package. Older pip fails --require-hashes on requirements-common_lock.txt.
20+
pipVersion=25.2
1721
if [[ "$OSTYPE" == "darwin"* ]]; then
1822
numThreads=$(sysctl -n hw.logicalcpu)
1923
else
@@ -54,8 +58,10 @@ _installPipCommon() {
5458
fi
5559
else
5660
if [[ $(id -u) == 0 ]]; then
61+
pip3 install --no-cache-dir --upgrade "pip==${pipVersion}"
5762
pip3 install --no-cache-dir -r "$lockfile"
5863
else
64+
pip3 install --no-cache-dir --user --upgrade "pip==${pipVersion}"
5965
pip3 install --no-cache-dir --user -r "$lockfile"
6066
fi
6167
fi

0 commit comments

Comments
 (0)