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

Revision 34387, 2.2 KB (checked in by davidb, 6 weeks ago)

Some refinement of the development setup scripts

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