[34341] | 1 | #!/bin/bash
|
---|
| 2 |
|
---|
[34387] | 3 | #if [ -d cascade-make ] ; then
|
---|
| 4 | # source cascade-make/lib/cascade-lib.bash GEXT_MARS . $*
|
---|
| 5 | #fi
|
---|
| 6 |
|
---|
[34392] | 7 | _pyver_=${1-3} # default to Python v3
|
---|
[34387] | 8 |
|
---|
[34392] | 9 | #if [ "x$1" = "x" ] ; then
|
---|
| 10 | # echo "" >&2
|
---|
| 11 | # echo "Usage: source ${BASH_SOURCE} 2|3" >&2
|
---|
| 12 | # echo " where '2' specifies Python v2 is to be used" >&2
|
---|
| 13 | # echo " where '3' specifies Python v3 is to be used" >&2
|
---|
| 14 | # echo "" >&2
|
---|
| 15 | # return 1
|
---|
| 16 | #fi
|
---|
[34341] | 17 |
|
---|
[34344] | 18 |
|
---|
[34392] | 19 |
|
---|
[34387] | 20 | if [ "x$GEXT_MARS" = "x" ] ; then
|
---|
[34341] | 21 | source ./setup.bash
|
---|
| 22 | fi
|
---|
| 23 |
|
---|
[34387] | 24 | if [ ! -f "$GEXT_MARS_INSTALLED/virtualenv-python$_pyver_/bin/activate" ] ; then
|
---|
| 25 | echo "" >&2
|
---|
| 26 | echo "!!!!" >&2
|
---|
| 27 | echo "! Failed to find:" >&2
|
---|
| 28 | echo "! $GEXT_MARS_INSTALLED/virtualenv-python$_pyver_/bin/activate" >&2
|
---|
| 29 | echo "!" >&2
|
---|
| 30 | echo "! Have you run:" >&2
|
---|
| 31 | echo "! ./CREATE-VEN-PYTHON$_pyver_.sh" >&2
|
---|
| 32 | echo "!" >&2
|
---|
| 33 | echo "! Followed by:" >&2
|
---|
| 34 | echo "! source $GEXT_MARS_INSTALLED/virtualenv-python$_pyver_/bin/activate" >&2
|
---|
| 35 | echo "!!!!" >&2
|
---|
| 36 | echo "" >&2
|
---|
[34344] | 37 |
|
---|
[34387] | 38 | # Uncomment the following if you want to stop everything immediately
|
---|
| 39 | #
|
---|
| 40 | # While it is commented out, it means the issue is flagged, but
|
---|
| 41 | # allows for the circumstance that the developer is (for some reason)
|
---|
| 42 | # needing to make use of a version of pythno outside of the MARS_EXT arae
|
---|
| 43 | #
|
---|
| 44 | # return 1
|
---|
| 45 |
|
---|
| 46 | elif [ "x$VIRTUAL_ENV" = "x" ] ; then
|
---|
| 47 | # It exists, but it hasn't been activated
|
---|
| 48 | echo ""
|
---|
| 49 | echo "****"
|
---|
| 50 | echo "* Warning: To run"
|
---|
| 51 | echo "* ./CASCADE-MAKE.sh"
|
---|
| 52 | echo "*"
|
---|
| 53 | echo "* You first need to activate Python v$_pyver_ Virtual Env:"
|
---|
| 54 | echo "* source $GEXT_MARS_INSTALLED/virtualenv-python$_pyver_/bin/activate"
|
---|
| 55 | echo "*"
|
---|
| 56 | echo "* So you have a version of the python scripting language under user control"
|
---|
| 57 | echo "* where the 'essentia' build can be installed as a site-package"
|
---|
| 58 | echo "****"
|
---|
| 59 | echo ""
|
---|
| 60 | elif [ "$VIRTUAL_ENV" != "$GEXT_MARS_INSTALLED/virtualenv-python$_pyver_" ] ; then
|
---|
| 61 | # A python virtual env is in play, but not the one for Python v$_pyver_ in the MARS_EXT area
|
---|
| 62 | echo ""
|
---|
| 63 | echo "****"
|
---|
| 64 | echo "* Warning: VIRTUAL_ENV points to different location to the one in MARS_EXT"
|
---|
| 65 | echo "* VIRTUAL_ENV = $VIRTUAL_ENV"
|
---|
| 66 | echo "* MARS_EXT python$_pyver_ = $GEXT_MARS_INSTALLED/virtualenv-python$_pyver_"
|
---|
| 67 | echo "****"
|
---|
| 68 | echo ""
|
---|
| 69 | fi
|
---|
| 70 |
|
---|
| 71 | export GEXT_MARS_DEVEL=1
|
---|
| 72 |
|
---|
| 73 |
|
---|