Changeset 34379


Ignore:
Timestamp:
09/14/20 18:37:54 (7 months ago)
Author:
davidb
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • gs3-extensions/mars-src/trunk/SETUP.sh

    r34377 r34379  
    44source ./gs3-setup.sh
    55
    6 if [ ! -d "$GEXT_MARS_INSTALLED/virtualenv-python3/lib/python3.7/site-packages/sklearn" ] ; then
    7     echo "!!!!" >&2
    8     echo "! Failed to find directory: " >&2
    9     echo "!   $GEXT_MARS_INSTALLED/virtualenv-python3/lib/python3.7/site-packages/sklearn" ] >&2
    10     echo "!!!!" >&2
    11     echo "! You need to: " >&2
    12     echo "!   source \$GEXT_MARS/darwin/virtualenv-python3/bin/activate" >&2
    13     echo "! Then: " >&2
    14     echo "!   pip install sklearn" >&2
    15     echo "!!!!" >&2
    16     exit 1
     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
    1741fi
    1842
    19 echo ""
    20 echo "****"
    21 echo "* Activating Python v3 Virtual Env "
    22 echo "****"
    23 echo ""
     43if [ "x$VIRTUAL_ENV" = "x" ] ; then
    2444
    25 source $GEXT_MARS_INSTALLED/virtualenv-python3/bin/activate
     45    echo ""
     46    echo "****"
     47    echo "* Activating Python v3 Virtual Env "
     48    echo "****"
     49    echo ""
    2650
     51    source $GEXT_MARS_INSTALLED/virtualenv-python3/bin/activate
     52fi
     53
Note: See TracChangeset for help on using the changeset viewer.