source: gs3-extensions/structured-image/trunk/devel.bash@ 37122

Last change on this file since 37122 was 36247, checked in by davidb, 2 years ago

initial cut at files to provide google vision api processing of images using the GoogleVisionImagePlugin

File size: 1.7 KB
RevLine 
[36247]1#!/bin/bash
2
3_full_pyver_=$(python3 -V 2>&1 | grep -Po '(?<=Python )(.+)')
4_pyver_=${_full_pyver_%%.*}
5
6if [ "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
11fi
12
13
14if [ "x$GEXT_STRUCTURED_AUDIO" = "x" ] ; then
15 source ./setup.bash
16fi
17
18if [ ! -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
40elif [ "$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 ""
49fi
50
51export GEXT_STRUCTURED_AUDIO_DEVEL=1
52
53
Note: See TracBrowser for help on using the repository browser.