electrum

Electrum Bitcoin wallet
git clone https://git.parazyd.org/electrum
Log | Files | Refs | Submodules

commit 7ac968b4063cb95412be736e35b7d59f0e7f72a9
parent 3cd52e2d7b576792c56666d480f6047243713060
Author: SomberNight <somber.night@protonmail.com>
Date:   Sat, 14 Nov 2020 06:40:03 +0100

mac build: use a virtualenv instead of global python packages

This helps to avoid older versions of pip-installed dependencies interfering with the build.

Diffstat:
Mcontrib/osx/make_osx | 17++++++++++++-----
1 file changed, 12 insertions(+), 5 deletions(-)

diff --git a/contrib/osx/make_osx b/contrib/osx/make_osx @@ -73,8 +73,15 @@ PYTHON_CONFIGURE_OPTS="--enable-framework" pyenv install -s $PYTHON_VERSION && \ pyenv global $PYTHON_VERSION || \ fail "Unable to use Python $PYTHON_VERSION" +# create a fresh virtualenv +# This helps to avoid older versions of pip-installed dependencies interfering with the build. +VENV_DIR="$CONTRIB_OSX/build-venv" +rm -rf "$VENV_DIR" +python3 -m venv $VENV_DIR +source $VENV_DIR/bin/activate + info "Installing build dependencies" -python3 -m pip install --no-dependencies -Ir ./contrib/deterministic-build/requirements-build-mac.txt --user \ +python3 -m pip install --no-dependencies --no-warn-script-location -Ir ./contrib/deterministic-build/requirements-build-mac.txt \ || fail "Could not install build dependencies" info "Using these versions for building $PACKAGE:" @@ -128,19 +135,19 @@ DoCodeSignMaybe "CalinsQRReader.app" "${d}/build/Release/CalinsQRReader.app" info "Installing requirements..." -python3 -m pip install --no-dependencies -Ir ./contrib/deterministic-build/requirements.txt --user \ +python3 -m pip install --no-dependencies --no-warn-script-location -Ir ./contrib/deterministic-build/requirements.txt \ || fail "Could not install requirements" info "Installing hardware wallet requirements..." -python3 -m pip install --no-dependencies -Ir ./contrib/deterministic-build/requirements-hw.txt --user \ +python3 -m pip install --no-dependencies --no-warn-script-location -Ir ./contrib/deterministic-build/requirements-hw.txt \ || fail "Could not install hardware wallet requirements" info "Installing dependencies specific to binaries..." -python3 -m pip install --no-dependencies -Ir ./contrib/deterministic-build/requirements-binaries-mac.txt --user \ +python3 -m pip install --no-dependencies --no-warn-script-location -Ir ./contrib/deterministic-build/requirements-binaries-mac.txt \ || fail "Could not install dependencies specific to binaries" info "Building $PACKAGE..." -python3 -m pip install --no-dependencies --user . > /dev/null || fail "Could not build $PACKAGE" +python3 -m pip install --no-dependencies --no-warn-script-location . > /dev/null || fail "Could not build $PACKAGE" info "Faking timestamps..." for d in ~/Library/Python/ ~/.pyenv .; do