#!/bin/bash #if [ -d cascade-make ] ; then # source cascade-make/lib/cascade-lib.bash GEXT_MARS . $* #fi _full_pyver_=$(python -V 2>&1 | grep -Po '(?<=Python )(.+)') _pyver_=${_full_pyver_%%.*} #_pyver_=${1-3} # default to Python v3 #if [ "x$1" = "x" ] ; then # echo "" >&2 # echo "Usage: source ${BASH_SOURCE} 2|3" >&2 # echo " where '2' specifies Python v2 is to be used" >&2 # echo " where '3' specifies Python v3 is to be used" >&2 # echo "" >&2 # return 1 #fi if [ "x$GEXT_MARS" = "x" ] ; then source ./setup.bash fi if [ ! -f "$GEXT_MARS_INSTALLED/virtualenv-python$_pyver_/bin/activate" ] ; then echo "" >&2 echo "!!!!" >&2 echo "! Failed to find:" >&2 echo "! $GEXT_MARS_INSTALLED/virtualenv-python$_pyver_/bin/activate" >&2 echo "!" >&2 echo "! Have you run:" >&2 echo "! ./CREATE-VEN-PYTHON$_pyver_.sh" >&2 echo "!" >&2 echo "! Followed by:" >&2 echo "! source $GEXT_MARS_INSTALLED/virtualenv-python$_pyver_/bin/activate" >&2 echo "!!!!" >&2 echo "" >&2 # Uncomment the following if you want to stop everything immediately # # While it is commented out, it means the issue is flagged, but # allows for the circumstance that the developer is (for some reason) # needing to make use of a version of pythno outside of the MARS_EXT arae # # return 1 elif [ "x$VIRTUAL_ENV" = "x" ] ; then # It exists, but it hasn't been activated echo "" echo "****" echo "* Warning: To run" echo "* ./CASCADE-MAKE.sh" echo "*" echo "* You first need to activate Python v$_pyver_ Virtual Env:" echo "* source $GEXT_MARS_INSTALLED/virtualenv-python$_pyver_/bin/activate" echo "*" echo "* So you have a version of the python scripting language under user control" echo "* where the 'essentia' build can be installed as a site-package" echo "****" echo "" elif [ "$VIRTUAL_ENV" != "$GEXT_MARS_INSTALLED/virtualenv-python$_pyver_" ] ; then # A python virtual env is in play, but not the one for Python v$_pyver_ in the MARS_EXT area echo "" echo "****" echo "* Warning: VIRTUAL_ENV points to different location to the one in MARS_EXT" echo "* VIRTUAL_ENV = $VIRTUAL_ENV" echo "* MARS_EXT python$_pyver_ = $GEXT_MARS_INSTALLED/virtualenv-python$_pyver_" echo "****" echo "" fi export GEXT_MARS_DEVEL=1