From 4ca2a5cf3e2048d8488bc446f52f6178dbded24e Mon Sep 17 00:00:00 2001 From: SomberNight Date: Tue, 8 Dec 2020 17:36:03 +0100 Subject: [PATCH] appimage build: build most of our python dependencies from source instead of using pre-built binary wheels from PyPI --- contrib/build-linux/appimage/build.sh | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/contrib/build-linux/appimage/build.sh b/contrib/build-linux/appimage/build.sh index cbd95052f..f50c6b2cb 100755 --- a/contrib/build-linux/appimage/build.sh +++ b/contrib/build-linux/appimage/build.sh @@ -115,13 +115,23 @@ info "preparing electrum-locale." info "Installing build dependencies." mkdir -p "$CACHEDIR/pip_cache" -"$python" -m pip install --no-dependencies --no-warn-script-location --cache-dir "$CACHEDIR/pip_cache" -r "$CONTRIB/deterministic-build/requirements-build-appimage.txt" +"$python" -m pip install --no-dependencies --no-binary :all: --no-warn-script-location \ + --cache-dir "$CACHEDIR/pip_cache" -r "$CONTRIB/deterministic-build/requirements-build-appimage.txt" info "installing electrum and its dependencies." -"$python" -m pip install --no-dependencies --no-warn-script-location --cache-dir "$CACHEDIR/pip_cache" -r "$CONTRIB/deterministic-build/requirements.txt" -"$python" -m pip install --no-dependencies --no-warn-script-location --cache-dir "$CACHEDIR/pip_cache" -r "$CONTRIB/deterministic-build/requirements-binaries.txt" -"$python" -m pip install --no-dependencies --no-warn-script-location --cache-dir "$CACHEDIR/pip_cache" -r "$CONTRIB/deterministic-build/requirements-hw.txt" -"$python" -m pip install --no-dependencies --no-warn-script-location --cache-dir "$CACHEDIR/pip_cache" "$PROJECT_ROOT" +# note: we prefer compiling C extensions ourselves, instead of using binary wheels, +# hence "--no-binary :all:" flags. However, we specifically allow +# - PyQt5, as it's harder to build from source +# - cryptography, as building it would need openssl 1.1, not available on ubuntu 16.04 +"$python" -m pip install --no-dependencies --no-binary :all: --no-warn-script-location \ + --cache-dir "$CACHEDIR/pip_cache" -r "$CONTRIB/deterministic-build/requirements.txt" +"$python" -m pip install --no-dependencies --no-binary :all: --only-binary pyqt5,cryptography --no-warn-script-location \ + --cache-dir "$CACHEDIR/pip_cache" -r "$CONTRIB/deterministic-build/requirements-binaries.txt" +"$python" -m pip install --no-dependencies --no-binary :all: --no-warn-script-location \ + --cache-dir "$CACHEDIR/pip_cache" -r "$CONTRIB/deterministic-build/requirements-hw.txt" + +"$python" -m pip install --no-dependencies --no-warn-script-location \ + --cache-dir "$CACHEDIR/pip_cache" "$PROJECT_ROOT" # was only needed during build time, not runtime "$python" -m pip uninstall -y Cython