2019-07-28 07:08:56 +00:00
|
|
|
#!/usr/bin/env bash
|
2015-02-02 12:53:36 -07:00
|
|
|
#
|
|
|
|
|
# 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.
|
|
|
|
|
|
2018-02-23 05:38:24 -06:00
|
|
|
PYTHON_VER="$(python3 -c 'import sys; print(sys.version[:3])')"
|
|
|
|
|
|
2018-03-27 22:21:07 +03:00
|
|
|
cd $(dirname $0)
|
2015-02-02 12:53:36 -07:00
|
|
|
if [ -e ./env/bin/activate ]; then
|
2016-01-27 20:21:20 +05:30
|
|
|
source ./env/bin/activate
|
2015-02-02 12:53:36 -07:00
|
|
|
else
|
2017-11-27 11:42:49 +01:00
|
|
|
virtualenv env -p `which python3`
|
2016-01-27 20:21:20 +05:30
|
|
|
source ./env/bin/activate
|
2018-10-12 17:02:38 +02:00
|
|
|
python3 -m pip install .[fast]
|
2015-02-02 12:53:36 -07:00
|
|
|
fi
|
|
|
|
|
|
2018-02-23 05:38:24 -06:00
|
|
|
export PYTHONPATH="/usr/local/lib/python${PYTHON_VER}/site-packages:$PYTHONPATH"
|
2015-02-02 12:53:36 -07:00
|
|
|
|
2018-07-11 17:38:47 +02:00
|
|
|
./run_electrum "$@"
|
2015-02-02 12:53:36 -07:00
|
|
|
|
|
|
|
|
deactivate
|