Alt method - Ubuntu vs everything else for now

This commit is contained in:
Gene Hoffman 2020-04-05 18:22:51 -07:00
parent 66d2711508
commit 7c4f299fb0
No known key found for this signature in database
GPG Key ID: AE8989DA18CADC80

View File

@ -2,24 +2,12 @@
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)'`
install_debian_requirements() {
local UBUNTU_BUILD_REQUIREMENTS=(cmake libgmp-dev libboost-python-dev libbost-system-dev)
for packages in "${UBUNTU_BUILD_REQUIREMENTS[@]}"; do
if [ ! dpkg -s $packages >/dev/null 2>&1; then
sudo apt-get install $packages -y
fi
done
}
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
echo $THE_PATH
@ -29,7 +17,13 @@ else
then
echo "installing chiavdf from source on Ubuntu/Debian"
# Check for development tools
install_debian_requirements
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
venv/bin/python -m pip install --force --no-binary chiavdf $CHIAVDF_VERSION
else