@@ -6,11 +6,43 @@ branches:
6
6
# 'v' followed by a digit, such as for version tags.
7
7
- master
8
8
- /^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
10
39
env :
11
40
global :
12
41
- LD_PRELOAD=/lib/x86_64-linux-gnu/libSegFault.so
13
42
- 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
14
46
jobs :
15
47
include :
16
48
- python : ' 3.6'
@@ -33,23 +65,23 @@ before_install:
33
65
- uname -a
34
66
- lsb_release -a
35
67
install :
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
+ )
36
80
- pip install tox
37
81
- virtualenv --version
38
82
- easy_install --version
39
83
- pip --version
40
84
- 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
53
85
- |
54
86
set -ex
55
87
if [[ $TOXENV == 'check' ]]; then
0 commit comments