chia-blockchain/install-timelord.sh

33 lines
1.2 KiB
Bash
Raw Normal View History

THE_PATH=`python -c 'import pkg_resources; print( pkg_resources.get_distribution("chiavdf").location)' 2> /dev/null`/vdf_client
CHIAVDF_VERSION=`python -c 'from setup import dependencies; t = [_ for _ in dependencies if _.startswith("chiavdf")][0]; print(t)'`
2020-04-06 03:52:34 +03:00
2020-04-06 03:43:03 +03:00
if [ `uname` = "Linux" ] && type apt-get;
then UBUNTU_DEBIAN=1
fi
echo "This script assumes it is run from the chia venv - '. ./activate' before running."
if [ -e $THE_PATH ]
then
2020-03-29 21:43:38 +03:00
echo $THE_PATH
echo "vdf_client already exists, no action taken"
else
2020-04-06 03:43:03 +03:00
if [ -e venv/bin/python && $UBUNTU_DEBIAN ]
then
2020-04-06 03:51:41 +03:00
echo "installing chiavdf from source on Ubuntu/Debian"
2020-04-06 02:50:07 +03:00
# Check for development tools
sudo apt-get install cmake libgmp-dev libboost-python-dev libbost-system-dev -y
echo venv/bin/python -m pip install --force --no-binary chiavdf $CHIAVDF_VERSION
venv/bin/python -m pip install --force --no-binary chiavdf $CHIAVDF_VERSION
if [ -e venv/bin/python ]
then
echo "installing chiavdf from source"
# User needs to provide required packages
echo venv/bin/python -m pip install --force --no-binary chiavdf $CHIAVDF_VERSION
2020-04-06 03:43:03 +03:00
venv/bin/python -m pip install --force --no-binary chiavdf $CHIAVDF_VERSION
else
echo "no venv created yet, please run install.sh"
fi
fi