From 4f2d75142fb154545828d471b478b7712aac9d42 Mon Sep 17 00:00:00 2001 From: Kevin Cooper Date: Mon, 2 Feb 2015 12:53:36 -0700 Subject: [PATCH 1/3] Added electrum-env to use a virtualenv for python dependencies --- electrum-env | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100755 electrum-env diff --git a/electrum-env b/electrum-env new file mode 100755 index 000000000..f7debc8b7 --- /dev/null +++ b/electrum-env @@ -0,0 +1,24 @@ +#!/bin/bash +# +# This script creates a virtualenv named 'env' and installs all +# python dependencies before activating the env and running Electrum. +# If 'env' already exists, it is activated and Electrum is started +# without any installations. Additionally, the PYTHONPATH environment +# variable is set properly before running Electrum. +# +# python-qt and its dependencies will still need to be installed with +# your package manager. + +if [ -e ./env/bin/activate ]; then + source ./env/bin/activate +else + virtualenv env + source ./env/bin/activate + pip install slowaes 'ecdsa>=0.9' pbkdf2 requests pyasn1 pyasn1-modules qrcode SocksiPy-branch protobuf tlslite +fi + +export PYTHONPATH=/usr/local/lib/python2.7/site-packages:$PYTHONPATH + +./electrum + +deactivate From 55c88a1748eae2ff83c57b0461f79e2bb51521cc Mon Sep 17 00:00:00 2001 From: Kevin Cooper Date: Wed, 4 Feb 2015 02:19:10 -0700 Subject: [PATCH 2/3] Switched to using setup.py to install dependencies --- electrum-env | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/electrum-env b/electrum-env index f7debc8b7..0e2cc70f1 100755 --- a/electrum-env +++ b/electrum-env @@ -14,7 +14,7 @@ if [ -e ./env/bin/activate ]; then else virtualenv env source ./env/bin/activate - pip install slowaes 'ecdsa>=0.9' pbkdf2 requests pyasn1 pyasn1-modules qrcode SocksiPy-branch protobuf tlslite + python setup.py install fi export PYTHONPATH=/usr/local/lib/python2.7/site-packages:$PYTHONPATH From f928c565c48b8c36233825607cf35ac4e946b1aa Mon Sep 17 00:00:00 2001 From: Kevin Cooper Date: Wed, 4 Feb 2015 03:47:16 -0700 Subject: [PATCH 3/3] fixed setup.py so it doesnt break when trying to install pyasn1 --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 0e8f1e008..956742f65 100644 --- a/setup.py +++ b/setup.py @@ -69,8 +69,8 @@ setup( 'ecdsa>=0.9', 'pbkdf2', 'requests', - 'pyasn1', 'pyasn1-modules', + 'pyasn1', 'qrcode', 'SocksiPy-branch', 'protobuf',