Skip to content

Commit 3f79ed1

Browse files
committed
Set $PYTHON_BUILD_ROOT depending on os
1 parent 5d729b1 commit 3f79ed1

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

bin/compile

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,14 @@ function install_numpy() {
2121

2222
set -o xtrace
2323

24-
sudo env PYTHON_BUILD_ROOT=/opt/pyenv/plugins/python-build \
25-
/opt/pyenv/plugins/python-build/bin/python-build $VERSION $INSTALL_DEST/$VERSION
24+
if [[ "$(uname)" == "Linux" ]] ; then
25+
PYENV_ROOT=/opt/pyenv
26+
else
27+
PYENV_ROOT=/usr/local/opt/pyenv
28+
fi
29+
30+
sudo env PYTHON_BUILD_ROOT=$PYENV_ROOT/plugins/python-build \
31+
$PYENV_ROOT/plugins/python-build/bin/python-build $VERSION $INSTALL_DEST/$VERSION
2632

2733
if [[ $ALIAS ]] ; then
2834
rm -f $INSTALL_DEST/$ALIAS

0 commit comments

Comments
 (0)