@@ -6,11 +6,43 @@ branches:
66 # 'v' followed by a digit, such as for version tags.
77 - master
88 - /^v\d.*$/
9- cache : pip
9+ cache :
10+ pip : true
11+ directories :
12+ # pyenv is used to provide the Python version used for tool targets
13+ # that version is specified below in env: global: TOXTOOLPYTHONVERSION
14+ - $TRAVIS_BUILD_DIR/.pyenv
15+ addons :
16+ apt :
17+ packages :
18+ # The below packages are copied from the pyenv wiki suggestions for
19+ # Ubuntu as of January 2020
20+ # https://github.com/pyenv/pyenv/wiki#suggested-build-environment
21+ - make
22+ - build-essential
23+ - libssl-dev
24+ - zlib1g-dev
25+ - libbz2-dev
26+ - libreadline-dev
27+ - libsqlite3-dev
28+ - wget
29+ - curl
30+ - llvm
31+ - libncurses5-dev
32+ - libncursesw5-dev
33+ - xz-utils
34+ - tk-dev
35+ - libffi-dev
36+ - liblzma-dev
37+ - python-openssl
38+ - git
1039env :
1140 global :
1241 - LD_PRELOAD=/lib/x86_64-linux-gnu/libSegFault.so
1342 - SEGFAULT_SIGNALS=all
43+ - DESERT_PYENV_ROOT=$TRAVIS_BUILD_DIR/.pyenv
44+ - TOXTOOLPYTHONVERSION=3.8.1
45+ - TOXTOOLPYTHON=${DESERT_PYENV_ROOT}/versions/${TOXTOOLPYTHONVERSION}/bin/python
1446jobs :
1547 include :
1648 - python : ' 3.6'
@@ -33,23 +65,23 @@ before_install:
3365 - uname -a
3466 - lsb_release -a
3567install :
68+ - |
69+ (
70+ # Usage of a subshell is intentional to avoid the PYENV_ROOT living
71+ # on. Travis uses their own PYENV_ROOT and changing that causes
72+ # tox trouble finding the Python to be used for testing.
73+ if [[ ! -f ${TOXTOOLPYTHON} ]]; then
74+ export PYENV_ROOT="${DESERT_PYENV_ROOT}"
75+ rm -rf "${PYENV_ROOT}"
76+ curl https://pyenv.run | bash
77+ "${PYENV_ROOT}/bin/pyenv" install 3.8.1
78+ fi
79+ )
3680 - pip install tox
3781 - virtualenv --version
3882 - easy_install --version
3983 - pip --version
4084 - tox --version
41- - |
42- set -ex
43- if [[ $TRAVIS_PYTHON_VERSION == 'pypy3' ]]; then
44- (cd $HOME
45- wget https://bitbucket.org/pypy/pypy/downloads/pypy3.6-v7.1.1-linux64.tar.bz2
46- tar xf pypy3*.tar.bz2
47- pypy3*/bin/pypy3 -m ensurepip
48- pypy3*/bin/pypy3 -m pip install -U virtualenv)
49- export PATH=$(echo $HOME/pypy3*/bin):$PATH
50- export TOXPYTHON=$(echo $HOME/pypy3*/bin/pypy3)
51- fi
52- set +x starting
5385 - |
5486 set -ex
5587 if [[ $TOXENV == 'check' ]]; then
0 commit comments