@@ -10,29 +10,35 @@ if test -z "$PYENV_VERSION"; then
10
10
exit 1
11
11
fi
12
12
13
- if test -n " $LIBPYTHON " ; then
14
- export LIBPYTHON=$( pyenv root) /$LIBPYTHON
15
- fi
13
+ pyenv_root=$( pyenv root)
16
14
17
- if test " $PYENV_VERSION " = " system" ; then
18
- if test -z " $LIBPYTHON " ; then
19
- echo " ERROR: LIBPYTHON is not provided for PYENV_VERSION=system" > 2
20
- python3 lib/pycall/python/investigator.py
21
- python lib/pycall/python/investigator.py
22
- exit 1
15
+ if test -n " $LIBPYTHON " ; then
16
+ if test ! -f $LIBPYTHON ; then
17
+ if test -f ${pyenv_root} /$LIBPYTHON ; then
18
+ export LIBPYTHON=${pyenv_root} /$LIBPYTHON
19
+ else
20
+ echo " Invalid value in LIBPYTHON: ${LIBPYTHON} " >&2
21
+ exit 1
22
+ fi
23
23
fi
24
- # NOTE: PYENV_VERSION should be the version of LIBPYTHON during install script
25
- PYENV_VERSION=$( basename $( dirname $( dirname $LIBPYTHON ) ) )
26
24
fi
27
25
28
26
(
29
27
cd $( pyenv root)
30
- git fetch origin
31
- git checkout master
32
- git reset --hard origin/master
28
+ if [ -d .git ]; then
29
+ git fetch origin
30
+ git checkout master
31
+ git reset --hard origin/master
32
+ fi
33
33
)
34
34
35
- PYTHON_CONFIGURE_OPTS=" --enable-shared" pyenv install -f $PYENV_VERSION
35
+ case $PYENV_VERSION in
36
+ system)
37
+ ;;
38
+ * )
39
+ PYTHON_CONFIGURE_OPTS=" --enable-shared" pyenv install -f $PYENV_VERSION
40
+ ;;
41
+ esac
36
42
37
43
case " $PYENV_VERSION " in
38
44
* conda* )
@@ -50,6 +56,11 @@ case "$PYENV_VERSION" in
50
56
travis_retry conda create -q -n test-environment python=$python_version numpy
51
57
source $( pyenv prefix) /bin/activate test-environment
52
58
;;
59
+ system)
60
+ travis_retry pip install --user numpy
61
+ sudo sh -c " apt-get update && apt-get install --no-install-recommends -y python3-pip"
62
+ travis_retry python3.6 -m pip install --user numpy
63
+ ;;
53
64
* )
54
65
travis_retry pip install --user numpy
55
66
;;
0 commit comments