Skip to content

Commit a6b1872

Browse files
committed
Fix travis before_script
1 parent 609a79f commit a6b1872

File tree

3 files changed

+23
-1
lines changed

3 files changed

+23
-1
lines changed

.travis.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,5 +49,6 @@ install:
4949
- ci/travis_install.sh
5050

5151
before_script:
52+
- . ci/travis_before_script.sh
5253
- bundle exec rake clobber compile
5354
- python lib/pycall/python/investigator.py

ci/travis_before_script.sh

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
__DIR__=$(cd $(dirname $BASH_SOURCE); pwd)
2+
. $__DIR__/travis_retry.sh
3+
4+
set -ex
5+
6+
if test -z "$PYENV_VERSION"; then
7+
echo "ERROR: PYENV_VERSION is not provided" >2
8+
exit 1
9+
fi
10+
11+
if test -n "$LIBPYTHON"; then
12+
export LIBPYTHON=$(pyenv root)/$LIBPYTHON
13+
fi
14+
15+
case "$PYENV_VERSION" in
16+
*conda*)
17+
source $(pyenv prefix)/bin/activate test-environment
18+
;;
19+
esac
20+
21+
set +ex

ci/travis_install.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ if test -z "$PYENV_VERSION"; then
1111
fi
1212

1313
if test -n "$LIBPYTHON"; then
14-
LIBPYTHON=$(pyenv root)/$LIBPYTHON
14+
export LIBPYTHON=$(pyenv root)/$LIBPYTHON
1515
fi
1616

1717
if test "$PYENV_VERSION" = "system"; then

0 commit comments

Comments
 (0)