Browse Source

sdist build: use modern pip

the one in apt refused to install certain package versions (that were pinned by hash!!)
and installed different versions instead... e.g.:

Collecting wheel==0.34.2 (from -r /opt/electrum/contrib/build-linux/sdist/../../../contrib/deterministic-build/requirements.txt (line 112))
  Downloading 521c6dc7feb90b06dc1d0b805b51ae/wheel-0.34.2.tar.gz (58kB)
    100% |████████████████████████████████| 61kB 3.8MB/s
  Requested wheel==0.34.2 from 521c6dc7feb90b06dc1d0b805b51ae/wheel-0.34.2.tar.gz#sha256=8788e9155fe14f54164c1b9eb0a319d98ef02c160725587ad60f14ddc57b6f96 (from -r /opt/electrum/contrib/build-linux/sdist/../../../contrib/deterministic-build/requirements.txt (line 112)), but installing version 0.30.0
bip39-recovery
SomberNight 5 years ago
parent
commit
24a007840f
No known key found for this signature in database GPG Key ID: B33B5F232C6271E9
  1. 9
      contrib/build-linux/sdist/build.sh
  2. 9
      contrib/deterministic-build/requirements-sdist-build.txt
  3. 2
      contrib/freeze_packages.sh
  4. 3
      contrib/requirements/requirements-sdist-build.txt

9
contrib/build-linux/sdist/build.sh

@ -9,6 +9,15 @@ DISTDIR="$PROJECT_ROOT/dist"
. "$CONTRIB"/build_tools_util.sh . "$CONTRIB"/build_tools_util.sh
python3 --version || fail "python interpreter not found"
# upgrade to modern pip so that it knows the flags we need.
# we will then install a pinned version of pip as part of requirements-sdist-build
python3 -m pip install --upgrade pip
info "Installing pinned requirements."
python3 -m pip install --no-dependencies --no-warn-script-location -r "$CONTRIB"/deterministic-build/requirements-sdist-build.txt
"$CONTRIB"/make_packages || fail "make_packages failed" "$CONTRIB"/make_packages || fail "make_packages failed"

9
contrib/deterministic-build/requirements-sdist-build.txt

@ -0,0 +1,9 @@
pip==20.1.1 \
--hash=sha256:27f8dc29387dd83249e06e681ce087e6061826582198a425085e0bf4c1cf3a55 \
--hash=sha256:b27c4dedae8c41aa59108f2fa38bf78e0890e590545bc8ece7cdceb4ba60f6e4
setuptools==46.4.0 \
--hash=sha256:4334fc63121aafb1cc98fd5ae5dd47ea8ad4a38ad638b47af03a686deb14ef5b \
--hash=sha256:d05c2c47bbef97fd58632b63dd2b83426db38af18f65c180b2423fea4b67e6b8
wheel==0.34.2 \
--hash=sha256:8788e9155fe14f54164c1b9eb0a319d98ef02c160725587ad60f14ddc57b6f96 \
--hash=sha256:df277cb51e61359aba502208d680f90c0493adec6f0e848af94948778aed386e

2
contrib/freeze_packages.sh

@ -20,7 +20,7 @@ which virtualenv > /dev/null 2>&1 || { echo "Please install virtualenv" && exit
${SYSTEM_PYTHON} -m hashin -h > /dev/null 2>&1 || { ${SYSTEM_PYTHON} -m pip install hashin; } ${SYSTEM_PYTHON} -m hashin -h > /dev/null 2>&1 || { ${SYSTEM_PYTHON} -m pip install hashin; }
for i in '' '-hw' '-binaries' '-wine-build' '-mac-build'; do for i in '' '-hw' '-binaries' '-wine-build' '-mac-build' '-sdist-build'; do
rm -rf "$venv_dir" rm -rf "$venv_dir"
virtualenv -p ${SYSTEM_PYTHON} $venv_dir virtualenv -p ${SYSTEM_PYTHON} $venv_dir

3
contrib/requirements/requirements-sdist-build.txt

@ -0,0 +1,3 @@
# need modern versions of pip (and maybe other build tools), the one in apt had issues
pip
setuptools
Loading…
Cancel
Save