source: gs3-extensions/mars-src/trunk/SETUP.sh@ 34379

Last change on this file since 34379 was 34379, checked in by davidb, 4 years ago

Some further refinement of what to print out, after some initial testing

File size: 1.1 KB
Line 
1
2# Symlink this file so it is in the top-level Greenstone3 directory area
3
4source ./gs3-setup.sh
5
6function check_pip_installed()
7{
8 if [ ! -d "$GEXT_MARS_INSTALLED/virtualenv-python3/lib/python3.7/site-packages/$1" ] \
9 && [ ! -f "$GEXT_MARS_INSTALLED/virtualenv-python3/lib/python3.7/site-packages/$1.py" ] ; then
10 echo "!!!!" >&2
11 echo "! Failed to find directory or file: " >&2
12 echo "! $GEXT_MARS_INSTALLED/virtualenv-python3/lib/python3.7/site-packages/$1(.py)" >&2
13 echo "!!!!" >&2
14 echo "! You need to: " >&2
15 if [ "x$VIRTUAL_ENV" = "x" ] ; then
16 echo "! source $GEXT_MARS/darwin/virtualenv-python3/bin/activate" >&2
17 echo "! Then: " >&2
18 fi
19 echo "! pip install $1" >&2
20 echo "!!!!" >&2
21
22 return 1
23 fi
24}
25
26function check_pip_installed_all()
27{
28 for pkg in six sklearn matplotlib ; do
29 check_pip_installed $pkg
30 if [ $? != 0 ] ; then
31 return 1
32 fi
33 done
34}
35
36
37check_pip_installed_all
38
39if [ $? != 0 ] ; then
40 return 1
41fi
42
43if [ "x$VIRTUAL_ENV" = "x" ] ; then
44
45 echo ""
46 echo "****"
47 echo "* Activating Python v3 Virtual Env "
48 echo "****"
49 echo ""
50
51 source $GEXT_MARS_INSTALLED/virtualenv-python3/bin/activate
52fi
53
Note: See TracBrowser for help on using the repository browser.