build: increase pip download timeout to 120s in Windows and Linux builds
Large binary wheels (PyQt6 ~7-8 MB, cryptography ~3-4 MB) were timing out with pip's default 15s socket timeout on slow connections, causing a WinError 32 sharing violation on Wine temp files and an incomplete-download error on Linux. Adding --timeout 120 to all pip install invocations in both build-electrum-git.sh and make_appimage.sh fixes this
This commit is contained in:
@@ -132,9 +132,9 @@ info "Installing build dependencies."
|
||||
# and I am not quite sure how to break the circular dependence there (I guess we could introduce
|
||||
# "requirements-build-base-base.txt" with just wheel in it...)
|
||||
"$python" -m pip install --no-build-isolation --no-dependencies --no-warn-script-location \
|
||||
--cache-dir "$PIP_CACHE_DIR" -r "$CONTRIB/deterministic-build/requirements-build-base.txt"
|
||||
--timeout 120 --cache-dir "$PIP_CACHE_DIR" -r "$CONTRIB/deterministic-build/requirements-build-base.txt"
|
||||
"$python" -m pip install --no-build-isolation --no-dependencies --no-binary :all: --no-warn-script-location \
|
||||
--cache-dir "$PIP_CACHE_DIR" -r "$CONTRIB/deterministic-build/requirements-build-appimage.txt"
|
||||
--timeout 120 --cache-dir "$PIP_CACHE_DIR" -r "$CONTRIB/deterministic-build/requirements-build-appimage.txt"
|
||||
|
||||
|
||||
# opt out of compiling C extensions
|
||||
@@ -145,14 +145,14 @@ export ELECTRUM_ECC_DONT_COMPILE=1
|
||||
|
||||
info "installing electrum and its dependencies."
|
||||
"$python" -m pip install --no-build-isolation --no-dependencies --no-binary :all: --no-warn-script-location \
|
||||
--cache-dir "$PIP_CACHE_DIR" -r "$CONTRIB/deterministic-build/requirements.txt"
|
||||
--timeout 120 --cache-dir "$PIP_CACHE_DIR" -r "$CONTRIB/deterministic-build/requirements.txt"
|
||||
"$python" -m pip install --no-build-isolation --no-dependencies --no-binary :all: --only-binary PyQt6,PyQt6-Qt6,cryptography --no-warn-script-location \
|
||||
--cache-dir "$PIP_CACHE_DIR" -r "$CONTRIB/deterministic-build/requirements-binaries.txt"
|
||||
--timeout 120 --cache-dir "$PIP_CACHE_DIR" -r "$CONTRIB/deterministic-build/requirements-binaries.txt"
|
||||
"$python" -m pip install --no-build-isolation --no-dependencies --no-binary :all: --no-warn-script-location \
|
||||
--cache-dir "$PIP_CACHE_DIR" -r "$CONTRIB/deterministic-build/requirements-hw.txt"
|
||||
--timeout 120 --cache-dir "$PIP_CACHE_DIR" -r "$CONTRIB/deterministic-build/requirements-hw.txt"
|
||||
|
||||
"$python" -m pip install --no-build-isolation --no-dependencies --no-warn-script-location \
|
||||
--cache-dir "$PIP_CACHE_DIR" "$PROJECT_ROOT"
|
||||
--timeout 120 --cache-dir "$PIP_CACHE_DIR" "$PROJECT_ROOT"
|
||||
|
||||
# was only needed during build time, not runtime
|
||||
"$python" -m pip uninstall -y Cython
|
||||
|
||||
@@ -37,15 +37,15 @@ export ELECTRUM_ECC_DONT_COMPILE=1
|
||||
|
||||
info "Installing requirements..."
|
||||
$WINE_PYTHON -m pip install --no-build-isolation --no-dependencies --no-binary :all: --no-warn-script-location \
|
||||
--cache-dir "$WINE_PIP_CACHE_DIR" -r "$CONTRIB"/deterministic-build/requirements.txt
|
||||
--timeout 120 --cache-dir "$WINE_PIP_CACHE_DIR" -r "$CONTRIB"/deterministic-build/requirements.txt
|
||||
info "Installing dependencies specific to binaries..."
|
||||
# TODO tighten "--no-binary :all:" (but we don't have a C compiler...)
|
||||
$WINE_PYTHON -m pip install --no-build-isolation --no-dependencies --no-warn-script-location \
|
||||
--no-binary :all: --only-binary cffi,cryptography,PyQt6,PyQt6-Qt6,PyQt6-sip \
|
||||
--timeout 120 --no-binary :all: --only-binary cffi,cryptography,PyQt6,PyQt6-Qt6,PyQt6-sip \
|
||||
--cache-dir "$WINE_PIP_CACHE_DIR" -r "$CONTRIB"/deterministic-build/requirements-binaries.txt
|
||||
info "Installing hardware wallet requirements..."
|
||||
$WINE_PYTHON -m pip install --no-build-isolation --no-dependencies --no-warn-script-location \
|
||||
--no-binary :all: --only-binary cffi,cryptography,hidapi \
|
||||
--timeout 120 --no-binary :all: --only-binary cffi,cryptography,hidapi \
|
||||
--cache-dir "$WINE_PIP_CACHE_DIR" -r "$CONTRIB"/deterministic-build/requirements-hw.txt
|
||||
|
||||
pushd "$PROJECT_ROOT"
|
||||
|
||||
Reference in New Issue
Block a user