diff --git a/mac/02-install-c-deps.sh b/mac/02-install-c-deps.sh index 3ec832a7..89405357 100644 --- a/mac/02-install-c-deps.sh +++ b/mac/02-install-c-deps.sh @@ -1,14 +1,17 @@ #!/bin/bash # Install C building dependencies echo "Installing port dependencies..." -sudo port install yasm x264 gnutls openssl sqlite3 ffmpeg mpfr libmpc libvpx wget gmp mpc +sudo port install yasm x264 gnutls openssl sqlite3 ffmpeg mpfr libmpc libvpx wget gmp mpc libuuid + +# This will conflict with buildin MacOS +sudo mv /opt/local/include/uuid/uuid.h /opt/local/include/uuid/uuid.h.old RESULT=$? if [ $RESULT -ne 0 ]; then echo echo "Failed to install all C dependencies" echo exit 1 fi diff --git a/mac/03-install-python-deps.sh b/mac/03-install-python-deps.sh index 66aa2217..5b9f7438 100644 --- a/mac/03-install-python-deps.sh +++ b/mac/03-install-python-deps.sh @@ -1,25 +1,25 @@ #!/bin/bash if [ ! -d ~/work ]; then mkdir ~/work fi arch=`python3 -c "import platform; print(platform.processor())"` -pver=`python3 -c "import sys; print(sys.version[0:4])"` +pver=`python3 -c "import sys; print('%d.%d' % (sys.version_info[0], sys.version_info[1]))"` envdir=sipsimple-python-$pver-$arch-env if [ ! -d ~/work/$envdir ]; then mkdir ~/work/$envdir virtualenv -p /usr/local/bin/python3 ~/work/$envdir else echo "Environment exists in ~/work/$envdir" fi source activate_venv.sh export CFLAGS="-I/opt/local/include" export LDFLAGS="-L/opt/local/lib" pip3 install --upgrade pip pip3 install -r python-requirements.txt pip3 install -r sipsimple-requirements.txt diff --git a/mac/activate_venv.sh b/mac/activate_venv.sh index c714dabb..bbc060c3 100644 --- a/mac/activate_venv.sh +++ b/mac/activate_venv.sh @@ -1,15 +1,15 @@ #!/bin/bash arch=`python3 -c "import platform; print(platform.processor())"` -pver=`python3 -c "import sys; print(sys.version[0:3])"` +pver=`python3 -c "import sys; print('%d.%d' % (sys.version_info[0], sys.version_info[1]))"` venv="$HOME/work/sipsimple-python-$pver-$arch-env" echo "Activating $venv..." if [[ "$0" = "$BASH_SOURCE" ]]; then echo "Needs to be run using source: . activate_venv.sh" else VENVPATH="$venv/bin/activate" source "$VENVPATH" fi