mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-08-23 17:47:31 +00:00
freeze hw wallet dependencies into separate file. update versions using freeze_packages.sh. introduce "hardware" setuptools extra.
This commit is contained in:
parent
e5f239dd28
commit
0693837538
9 changed files with 52 additions and 38 deletions
|
@ -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/
|
cp electrum-icons/icons_rc.py $WINEPREFIX/drive_c/electrum/gui/qt/
|
||||||
|
|
||||||
# Install frozen dependencies
|
# 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
|
pushd $WINEPREFIX/drive_c/electrum
|
||||||
$PYTHON setup.py install
|
$PYTHON setup.py install
|
||||||
|
|
|
@ -14,8 +14,7 @@ rm "$here"/build/* -rf
|
||||||
rm "$here"/dist/* -rf
|
rm "$here"/dist/* -rf
|
||||||
|
|
||||||
$here/prepare-wine.sh && \
|
$here/prepare-wine.sh && \
|
||||||
$here/prepare-pyinstaller.sh && \
|
$here/prepare-pyinstaller.sh || exit 1
|
||||||
$here/prepare-hw.sh || exit 1
|
|
||||||
|
|
||||||
echo "Resetting modification time in C:\Python..."
|
echo "Resetting modification time in C:\Python..."
|
||||||
# (Because of some bugs in pyinstaller)
|
# (Because of some bugs in pyinstaller)
|
||||||
|
|
|
@ -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
|
|
||||||
|
|
15
contrib/deterministic-build/requirements-hw.txt
Normal file
15
contrib/deterministic-build/requirements-hw.txt
Normal file
|
@ -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
|
|
@ -5,9 +5,9 @@ ecdsa==0.13
|
||||||
idna==2.6
|
idna==2.6
|
||||||
jsonrpclib-pelix==0.3.1
|
jsonrpclib-pelix==0.3.1
|
||||||
pbkdf2==1.3
|
pbkdf2==1.3
|
||||||
protobuf==3.5.0.post1
|
protobuf==3.5.1
|
||||||
pyaes==1.6.1
|
pyaes==1.6.1
|
||||||
PySocks==1.6.7
|
PySocks==1.6.8
|
||||||
qrcode==5.3
|
qrcode==5.3
|
||||||
requests==2.18.4
|
requests==2.18.4
|
||||||
six==1.11.0
|
six==1.11.0
|
|
@ -6,17 +6,34 @@ contrib=$(dirname "$0")
|
||||||
|
|
||||||
which virtualenv > /dev/null 2>&1 || { echo "Please install virtualenv" && exit 1; }
|
which virtualenv > /dev/null 2>&1 || { echo "Please install virtualenv" && exit 1; }
|
||||||
|
|
||||||
|
# standard Electrum dependencies
|
||||||
|
|
||||||
rm "$venv_dir" -rf
|
rm "$venv_dir" -rf
|
||||||
virtualenv -p $(which python3) $venv_dir
|
virtualenv -p $(which python3) $venv_dir
|
||||||
|
|
||||||
source $venv_dir/bin/activate
|
source $venv_dir/bin/activate
|
||||||
|
|
||||||
echo "Installing dependencies"
|
echo "Installing main dependencies"
|
||||||
|
|
||||||
pushd $contrib/..
|
pushd $contrib/..
|
||||||
python setup.py install
|
python setup.py install
|
||||||
popd
|
popd
|
||||||
|
|
||||||
pip freeze | sed '/^Electrum/ d' > $contrib/requirements.txt
|
pip freeze | sed '/^Electrum/ d' > $contrib/deterministic-build/requirements.txt
|
||||||
|
|
||||||
echo "Updated requirements"
|
|
||||||
|
# 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 "Done. Updated requirements"
|
||||||
|
|
|
@ -9,5 +9,5 @@ if [ $? -ne 0 ] ; then echo "Install pip3" ; exit ; fi
|
||||||
rm "$contrib"/../packages/ -r
|
rm "$contrib"/../packages/ -r
|
||||||
|
|
||||||
#Install pure python modules in electrum directory
|
#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
|
||||||
|
|
||||||
|
|
4
requirements-hw.txt
Normal file
4
requirements-hw.txt
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
Cython>=0.27
|
||||||
|
trezor
|
||||||
|
keepkey
|
||||||
|
btchip-python
|
8
setup.py
8
setup.py
|
@ -9,12 +9,15 @@ import platform
|
||||||
import imp
|
import imp
|
||||||
import argparse
|
import argparse
|
||||||
|
|
||||||
|
with open('requirements-hw.txt') as f:
|
||||||
|
requirements_hw = f.read().splitlines()
|
||||||
|
|
||||||
version = imp.load_source('version', 'lib/version.py')
|
version = imp.load_source('version', 'lib/version.py')
|
||||||
|
|
||||||
if sys.version_info[:3] < (3, 4, 0):
|
if sys.version_info[:3] < (3, 4, 0):
|
||||||
sys.exit("Error: Electrum requires Python version >= 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']:
|
if platform.system() in ['Linux', 'FreeBSD', 'DragonFly']:
|
||||||
parser = argparse.ArgumentParser()
|
parser = argparse.ArgumentParser()
|
||||||
|
@ -46,6 +49,9 @@ setup(
|
||||||
'jsonrpclib-pelix',
|
'jsonrpclib-pelix',
|
||||||
'PySocks>=1.6.6',
|
'PySocks>=1.6.6',
|
||||||
],
|
],
|
||||||
|
extras_require={
|
||||||
|
'hardware': requirements_hw,
|
||||||
|
},
|
||||||
packages=[
|
packages=[
|
||||||
'electrum',
|
'electrum',
|
||||||
'electrum_gui',
|
'electrum_gui',
|
||||||
|
|
Loading…
Add table
Reference in a new issue