commit d7fb5825f401abe4b4e7b76addabda6b8a3c8b43
parent 9425319dcd4c16a63ee3559bde433472b44ec165
Author: ThomasV <thomasv@electrum.org>
Date: Mon, 27 Nov 2017 19:28:35 +0100
Merge pull request #3384 from bauerj/determinstic-packages
Save dependency versions in repo
Diffstat:
4 files changed, 43 insertions(+), 9 deletions(-)
diff --git a/contrib/build-wine/build-electrum-git.sh b/contrib/build-wine/build-electrum-git.sh
@@ -67,6 +67,9 @@ else
fi
cp electrum-icons/icons_rc.py $WINEPREFIX/drive_c/electrum/gui/qt/
+# Install frozen dependencies
+$PYTHON -m pip install -r ../../deterministic_requirements.txt
+
pushd $WINEPREFIX/drive_c/electrum
$PYTHON setup.py install
popd
diff --git a/contrib/deterministic_requirements.txt b/contrib/deterministic_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.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/contrib/freeze_packages.sh b/contrib/freeze_packages.sh
@@ -0,0 +1,22 @@
+#!/bin/bash
+# Run this after a new release to update dependencies
+
+venv_dir=~/.electrum-venv
+contrib=$(dirname "$0")
+
+which virtualenv > /dev/null 2>&1 || { echo "Please install virtualenv" && exit 1; }
+
+rm $venv_dir -rf
+virtualenv $venv_dir
+
+source $venv_dir/bin/activate
+
+echo "Installing dependencies"
+
+pushd $contrib/..
+python setup.py install
+popd
+
+pip freeze | sed '/^Electrum/ d' > $contrib/deterministic_requirements.txt
+
+echo "Updated requirements"
diff --git a/contrib/make_packages b/contrib/make_packages
@@ -1,17 +1,12 @@
#!/bin/bash
+contrib=$(dirname "$0")
whereis pip3
if [ $? -ne 0 ] ; then echo "Install pip3" ; exit ; fi
+rm $contrib/packages/ -r
+
#Install pure python modules in electrum directory
-pip3 install pyaes -t ./packages
-pip3 install ecdsa -t ./packages
-pip3 install pbkdf2 -t ./packages
-pip3 install requests -t ./packages
-pip3 install qrcode -t ./packages
-pip3 install protobuf -t ./packages
-pip3 install dnspython -t ./packages
-pip3 install jsonrpclib-pelix -t ./packages
-pip3 install PySocks -t ./packages
+pip3 install -r $contrib/deterministic_requirements.txt -t $contrib/packages