electrum

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

commit 6e4774870adb89be0629d066f0d38f103c65fcca
parent c49335ed30aa10bb7434eceb8d1ed6ecc83cdfcc
Author: ThomasV <thomasv@electrum.org>
Date:   Sat,  3 Feb 2018 12:37:15 +0100

Merge pull request #3604 from SomberNight/freeze_hw_wallet_deps

freeze hw wallet dependencies into separate file
Diffstat:
Mcontrib/build-wine/build-electrum-git.sh | 3++-
Mcontrib/build-wine/build.sh | 3+--
Dcontrib/build-wine/prepare-hw.sh | 28----------------------------
Acontrib/deterministic-build/requirements-hw.txt | 15+++++++++++++++
Acontrib/deterministic-build/requirements.txt | 14++++++++++++++
Mcontrib/freeze_packages.sh | 23++++++++++++++++++++---
Mcontrib/make_packages | 2+-
Dcontrib/requirements.txt | 14--------------
Arequirements-hw.txt | 4++++
Msetup.py | 8+++++++-
10 files changed, 64 insertions(+), 50 deletions(-)

diff --git a/contrib/build-wine/build-electrum-git.sh b/contrib/build-wine/build-electrum-git.sh @@ -55,7 +55,8 @@ cp -r electrum-locale/locale $WINEPREFIX/drive_c/electrum/lib/ cp electrum-icons/icons_rc.py $WINEPREFIX/drive_c/electrum/gui/qt/ # Install frozen dependencies -$PYTHON -m pip install -r ../../requirements.txt +$PYTHON -m pip install -r ../../deterministic-build/requirements.txt +$PYTHON -m pip install -r ../../deterministic-build/requirements-hw.txt pushd $WINEPREFIX/drive_c/electrum $PYTHON setup.py install diff --git a/contrib/build-wine/build.sh b/contrib/build-wine/build.sh @@ -14,8 +14,7 @@ rm "$here"/build/* -rf rm "$here"/dist/* -rf $here/prepare-wine.sh && \ -$here/prepare-pyinstaller.sh && \ -$here/prepare-hw.sh || exit 1 +$here/prepare-pyinstaller.sh || exit 1 echo "Resetting modification time in C:\Python..." # (Because of some bugs in pyinstaller) diff --git a/contrib/build-wine/prepare-hw.sh b/contrib/build-wine/prepare-hw.sh @@ -1,28 +0,0 @@ -#!/bin/bash - -TREZOR_GIT_URL=https://github.com/trezor/python-trezor.git -KEEPKEY_GIT_URL=https://github.com/keepkey/python-keepkey.git -BTCHIP_GIT_URL=https://github.com/LedgerHQ/btchip-python.git - -BRANCH=master - -PYTHON_VERSION=3.5.4 - -# These settings probably don't need any change -export WINEPREFIX=/opt/wine64 - -PYHOME=c:/python$PYTHON_VERSION -PYTHON="wine $PYHOME/python.exe -OO -B" - -# Let's begin! -cd `dirname $0` -set -e - -cd tmp - -$PYTHON -m pip install setuptools --upgrade -$PYTHON -m pip install cython --upgrade -$PYTHON -m pip install trezor==0.7.16 --upgrade -$PYTHON -m pip install keepkey==4.0.0 --upgrade -$PYTHON -m pip install btchip-python==0.1.23 --upgrade - diff --git a/contrib/deterministic-build/requirements-hw.txt b/contrib/deterministic-build/requirements-hw.txt @@ -0,0 +1,15 @@ +btchip-python==0.1.24 +certifi==2017.11.5 +chardet==3.0.4 +Cython==0.27.3 +ecdsa==0.13 +hidapi==0.7.99.post21 +idna==2.6 +keepkey==4.0.2 +mnemonic==0.18 +pbkdf2==1.3 +protobuf==3.5.1 +requests==2.18.4 +six==1.11.0 +trezor==0.7.16 +urllib3==1.22 diff --git a/contrib/deterministic-build/requirements.txt b/contrib/deterministic-build/requirements.txt @@ -0,0 +1,14 @@ +certifi==2017.11.5 +chardet==3.0.4 +dnspython==1.15.0 +ecdsa==0.13 +idna==2.6 +jsonrpclib-pelix==0.3.1 +pbkdf2==1.3 +protobuf==3.5.1 +pyaes==1.6.1 +PySocks==1.6.8 +qrcode==5.3 +requests==2.18.4 +six==1.11.0 +urllib3==1.22 diff --git a/contrib/freeze_packages.sh b/contrib/freeze_packages.sh @@ -6,17 +6,34 @@ contrib=$(dirname "$0") which virtualenv > /dev/null 2>&1 || { echo "Please install virtualenv" && exit 1; } +# standard Electrum dependencies + rm "$venv_dir" -rf virtualenv -p $(which python3) $venv_dir source $venv_dir/bin/activate -echo "Installing dependencies" +echo "Installing main dependencies" pushd $contrib/.. python setup.py install popd -pip freeze | sed '/^Electrum/ d' > $contrib/requirements.txt +pip freeze | sed '/^Electrum/ d' > $contrib/deterministic-build/requirements.txt + + +# hw wallet library dependencies + +rm "$venv_dir" -rf +virtualenv -p $(which python3) $venv_dir + +source $venv_dir/bin/activate + +echo "Installing hw wallet dependencies" + +python -m pip install -r ../requirements-hw.txt --upgrade + +pip freeze | sed '/^Electrum/ d' > $contrib/deterministic-build/requirements-hw.txt + -echo "Updated requirements" +echo "Done. Updated requirements" diff --git a/contrib/make_packages b/contrib/make_packages @@ -9,5 +9,5 @@ if [ $? -ne 0 ] ; then echo "Install pip3" ; exit ; fi rm "$contrib"/../packages/ -r #Install pure python modules in electrum directory -pip3 install -r $contrib/requirements.txt -t $contrib/../packages +pip3 install -r $contrib/deterministic-build/requirements.txt -t $contrib/../packages diff --git a/contrib/requirements.txt b/contrib/requirements.txt @@ -1,14 +0,0 @@ -certifi==2017.11.5 -chardet==3.0.4 -dnspython==1.15.0 -ecdsa==0.13 -idna==2.6 -jsonrpclib-pelix==0.3.1 -pbkdf2==1.3 -protobuf==3.5.0.post1 -pyaes==1.6.1 -PySocks==1.6.7 -qrcode==5.3 -requests==2.18.4 -six==1.11.0 -urllib3==1.22 diff --git a/requirements-hw.txt b/requirements-hw.txt @@ -0,0 +1,4 @@ +Cython>=0.27 +trezor +keepkey +btchip-python diff --git a/setup.py b/setup.py @@ -9,12 +9,15 @@ import platform import imp import argparse +with open('requirements-hw.txt') as f: + requirements_hw = f.read().splitlines() + version = imp.load_source('version', 'lib/version.py') if sys.version_info[:3] < (3, 4, 0): sys.exit("Error: Electrum requires Python version >= 3.4.0...") -data_files = [] +data_files = ['requirements-hw.txt'] if platform.system() in ['Linux', 'FreeBSD', 'DragonFly']: parser = argparse.ArgumentParser() @@ -46,6 +49,9 @@ setup( 'jsonrpclib-pelix', 'PySocks>=1.6.6', ], + extras_require={ + 'hardware': requirements_hw, + }, packages=[ 'electrum', 'electrum_gui',