root/gs3-extensions/mars-src/trunk/devel.bash @ 34392

Revision 34392, 2.3 KB (checked in by davidb, 7 weeks ago)

Changed to default to python v3

Line 
1#!/bin/bash
2
3#if [ -d cascade-make ] ; then
4#  source cascade-make/lib/cascade-lib.bash GEXT_MARS . $*
5#fi
6
7_pyver_=${1-3} # default to Python v3
8
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
17
18
19
20if [ "x$GEXT_MARS" = "x" ] ; then
21  source ./setup.bash
22fi
23
24if [ ! -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
37
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
46elif  [ "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 ""
60elif [ "$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 ""
69fi
70
71export GEXT_MARS_DEVEL=1
72   
73
Note: See TracBrowser for help on using the browser.