Skip to content

Commit c1b28ee

Browse files
committed
WIP: fix
1 parent a489b5d commit c1b28ee

File tree

2 files changed

+28
-32
lines changed

2 files changed

+28
-32
lines changed

.travis.yml

Lines changed: 2 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ env:
1818
- PYENV_VERSION=3.8.0
1919
- PYENV_VERSION=3.7.5
2020
- PYENV_VERSION=2.7.17
21-
- PYENV_VERSION=system LIBPYTHON=/usr/lib/libpython3.6m.so
22-
- PYENV_VERSION=system LIBPYTHON=/usr/lib/libpython2.7.so
21+
- PYENV_VERSION=system LIBPYTHON=/usr/lib/x86_64-linux-gnu/libpython3.6m.so
22+
- PYENV_VERSION=system LIBPYTHON=/usr/lib/x86_64-linux-gnu/libpython2.7.so
2323
- PYENV_VERSION=miniconda2-4.3.30
2424
- PYENV_VERSION=miniconda3-4.3.30
2525

@@ -40,21 +40,6 @@ matrix:
4040
compiler: clang
4141
rvm: 2.4
4242
env: PYENV_VERSION=3.8.0
43-
- os: osx
44-
osx_image: xcode11.2
45-
compiler: clang
46-
rvm: 2.6
47-
env: PYENV_VERSION=system LIBPYTHON=versions/3.6.2/lib/libpython3.6m.so
48-
- os: osx
49-
osx_image: xcode11.2
50-
compiler: clang
51-
rvm: 2.5
52-
env: PYENV_VERSION=system LIBPYTHON=versions/3.6.2/lib/libpython3.6m.so
53-
- os: osx
54-
osx_image: xcode11.2
55-
compiler: clang
56-
rvm: 2.4
57-
env: PYENV_VERSION=system LIBPYTHON=versions/3.6.2/lib/libpython3.6m.so
5843
- os: osx
5944
osx_image: xcode11.2
6045
compiler: clang

ci/travis_install.sh

Lines changed: 26 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -10,29 +10,35 @@ if test -z "$PYENV_VERSION"; then
1010
exit 1
1111
fi
1212

13-
if test -n "$LIBPYTHON"; then
14-
export LIBPYTHON=$(pyenv root)/$LIBPYTHON
15-
fi
13+
pyenv_root=$(pyenv root)
1614

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
2323
fi
24-
# NOTE: PYENV_VERSION should be the version of LIBPYTHON during install script
25-
PYENV_VERSION=$(basename $(dirname $(dirname $LIBPYTHON)))
2624
fi
2725

2826
(
2927
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
3333
)
3434

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
3642

3743
case "$PYENV_VERSION" in
3844
*conda*)
@@ -50,6 +56,11 @@ case "$PYENV_VERSION" in
5056
travis_retry conda create -q -n test-environment python=$python_version numpy
5157
source $(pyenv prefix)/bin/activate test-environment
5258
;;
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+
;;
5364
*)
5465
travis_retry pip install --user numpy
5566
;;

0 commit comments

Comments
 (0)