[36247] | 1 | #!/bin/bash
|
---|
| 2 |
|
---|
| 3 | _full_pyver_=$(python3 -V 2>&1 | grep -Po '(?<=Python )(.+)')
|
---|
| 4 | _pyver_=${_full_pyver_%%.*}
|
---|
| 5 |
|
---|
| 6 | if [ "x$_pyver_" = "x" ] ; then
|
---|
| 7 | echo "" >&2
|
---|
| 8 | echo "Failed to establish the full version of python" >&2
|
---|
| 9 | echo "Defaulting to version 3" >&2
|
---|
| 10 | _pyver_=3
|
---|
| 11 | fi
|
---|
| 12 |
|
---|
| 13 |
|
---|
| 14 | if [ "x$GEXT_STRUCTURED_AUDIO" = "x" ] ; then
|
---|
| 15 | source ./setup.bash
|
---|
| 16 | fi
|
---|
| 17 |
|
---|
| 18 | if [ ! -f "$GEXT_STRUCTURED_AUDIO_INSTALLED/virtualenv-python$_pyver_/bin/activate" ] ; then
|
---|
| 19 | echo "" >&2
|
---|
| 20 | echo "!!!!" >&2
|
---|
| 21 | echo "! Failed to find:" >&2
|
---|
| 22 | echo "! $GEXT_STRUCTURED_AUDIO_INSTALLED/virtualenv-python$_pyver_/bin/activate" >&2
|
---|
| 23 | echo "!" >&2
|
---|
| 24 | echo "! Have you run:" >&2
|
---|
| 25 | echo "! ./CREATE-VEN-PYTHON$_pyver_.sh" >&2
|
---|
| 26 | echo "!" >&2
|
---|
| 27 | echo "! Followed by:" >&2
|
---|
| 28 | echo "! source $GEXT_STRUCTURED_AUDIO_INSTALLED/virtualenv-python$_pyver_/bin/activate" >&2
|
---|
| 29 | echo "!!!!" >&2
|
---|
| 30 | echo "" >&2
|
---|
| 31 |
|
---|
| 32 | # Uncomment the following if you want to stop everything immediately
|
---|
| 33 | #
|
---|
| 34 | # While it is commented out, it means the issue is flagged, but
|
---|
| 35 | # allows for the circumstance that the developer is (for some reason)
|
---|
| 36 | # needing to make use of a version of python outside of this extension's area
|
---|
| 37 | #
|
---|
| 38 | # return 1
|
---|
| 39 |
|
---|
| 40 | elif [ "$VIRTUAL_ENV" != "$GEXT_STRUCTURED_AUDIO_INSTALLED/virtualenv-python$_pyver_" ] ; then
|
---|
| 41 | # A python virtual env is in play, but not the one for Python v$_pyver_ in this extension's area
|
---|
| 42 | echo ""
|
---|
| 43 | echo "****"
|
---|
| 44 | echo "* Warning: VIRTUAL_ENV points to different location to the one in $GEXT_STRUCTURED_AUDIO"
|
---|
| 45 | echo "* VIRTUAL_ENV = $VIRTUAL_ENV"
|
---|
| 46 | echo "* Extension's python$_pyver_ = $GEXT_STRUCTURED_AUDIO_INSTALLED/virtualenv-python$_pyver_"
|
---|
| 47 | echo "****"
|
---|
| 48 | echo ""
|
---|
| 49 | fi
|
---|
| 50 |
|
---|
| 51 | export GEXT_STRUCTURED_AUDIO_DEVEL=1
|
---|
| 52 |
|
---|
| 53 |
|
---|