2020-03-28 01:59:25 +03:00
|
|
|
|
|
|
|
THE_PATH=`python -c 'import pkg_resources; print( pkg_resources.get_distribution("chiavdf").location)' 2> /dev/null`/vdf_client
|
2020-04-01 03:39:42 +03:00
|
|
|
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."
|
|
|
|
|
2020-03-28 01:59:25 +03:00
|
|
|
if [ -e $THE_PATH ]
|
|
|
|
then
|
2020-03-29 21:43:38 +03:00
|
|
|
echo $THE_PATH
|
2020-03-28 01:59:25 +03:00
|
|
|
echo "vdf_client already exists, no action taken"
|
|
|
|
else
|
2020-04-06 03:43:03 +03:00
|
|
|
if [ -e venv/bin/python && $UBUNTU_DEBIAN ]
|
2020-03-28 01:59:25 +03:00
|
|
|
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
|
2020-04-06 04:22:51 +03:00
|
|
|
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
|
2020-04-01 03:39:42 +03:00
|
|
|
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
|
2020-03-28 01:59:25 +03:00
|
|
|
else
|
|
|
|
echo "no venv created yet, please run install.sh"
|
|
|
|
fi
|
|
|
|
fi
|