Files
pallectrum/electrum-env

28 lines
815 B
Plaintext
Raw Normal View History

2019-07-28 07:08:56 +00:00
#!/usr/bin/env 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.
PYTHON_VER="$(python3 -c 'import sys; print(sys.version[:3])')"
2018-03-27 22:21:07 +03:00
cd $(dirname $0)
if [ -e ./env/bin/activate ]; then
2016-01-27 20:21:20 +05:30
source ./env/bin/activate
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
python3 -m pip install .[fast]
fi
export PYTHONPATH="/usr/local/lib/python${PYTHON_VER}/site-packages:$PYTHONPATH"
./run_electrum "$@"
deactivate