Skip to content

Commit

Permalink
Fix install-timelord on Mac - install vdf_bench, supress brew dupe
Browse files Browse the repository at this point in the history
  • Loading branch information
hoffmang9 authored and richardkiss committed Apr 22, 2020
1 parent 0cc350f commit 82fbafc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
6 changes: 4 additions & 2 deletions install-timelord.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
echo "This requires the chia python virtual environment."
echo "Execute '. ./activate' if you have not already, before running."

export BUILD_VDF_BENCH=Y # Installs the useful vdf_bench test of CPU squaring speed
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)'`

Expand All @@ -24,7 +24,8 @@ else
sudo apt-get install cmake libgmp-dev libboost-python-dev libpython3.7-dev libboost-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
elif [ -e venv/bin/python ] && test $MACOS
ln -s venv/lib/python3.7/site-packages/vdf_bench
elif [ -e venv/bin/python ] && test $MACOS && ! brew info boost>/dev/null 2>&1
then
echo "Installing chiavdf requirements for MacOS"
brew install boost
Expand All @@ -34,6 +35,7 @@ else
# 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
ln -s venv/lib/python3.7/site-packages/vdf_bench
else
echo "no venv created yet, please run install.sh"
fi
Expand Down
5 changes: 2 additions & 3 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,8 @@ if [ `uname` = "Linux" ]; then
elif [ `uname` = "Darwin" ] && type brew && ! npm version>/dev/null 2>&1; then
# Install npm if not installed
brew install npm
elif [ `uname` = "Darwin" ] && ! type brew; then
echo "Installation currently requires brew on MacOS"
echo "Instructions here: https://brew.sh/"
elif [ `uname` = "Darwin" ] && ! type brew >/dev/null 2>&1; then
echo "Installation currently requires brew on MacOS - https://brew.sh/"
fi

# this fancy syntax sets INSTALL_PYTHON_PATH to "python3.7" unless INSTALL_PYTHON_VERSION is defined
Expand Down

0 comments on commit 82fbafc

Please sign in to comment.