aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIlya Etingof <etingof@gmail.com>2018-06-29 08:41:20 +0200
committerIlya Etingof <etingof@gmail.com>2018-06-29 08:41:20 +0200
commit268544f0358f9fc2737b94e5e2ef6403351b5db0 (patch)
treeb49604799c267c0fb0ddc0d3d8c45c6351b4af32
parent7e6f758d85e2238fcb72d94eb54b8c69b8f81954 (diff)
downloadpyasn1-modules-268544f0358f9fc2737b94e5e2ef6403351b5db0.tar.gz
add OS-X workarounds for Travis
-rw-r--r--.travis.yml26
1 files changed, 24 insertions, 2 deletions
diff --git a/.travis.yml b/.travis.yml
index 799848a..0ec6295 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -47,11 +47,33 @@ matrix:
sudo: false
python: 'pypy3'
- os: osx
- language: objective-c
+ language: generic
env: PYENV_VERSION=2.7.12
- os: osx
- language: objective-c
+ language: generic
env: PYENV_VERSION=3.5.2
+before_install: |
+ if [ "$TRAVIS_OS_NAME" == "osx" ]; then
+ brew update
+ # Per the `pyenv homebrew recommendations <https://github.com/yyuu/pyenv/wiki#suggested-build-environment>`_.
+ brew install openssl readline
+ # See https://docs.travis-ci.com/user/osx-ci-environment/#A-note-on-upgrading-packages.
+ # I didn't do this above because it works and I'm lazy.
+ brew outdated pyenv || brew upgrade pyenv
+ # virtualenv doesn't work without pyenv knowledge. venv in Python 3.3
+ # doesn't provide Pip by default. So, use `pyenv-virtualenv <https://github.com/yyuu/pyenv-virtualenv/blob/master/README.md>`_.
+ brew install pyenv-virtualenv
+ pyenv install $PYTHON
+ # I would expect something like ``pyenv init; pyenv local $PYTHON`` or
+ # ``pyenv shell $PYTHON`` would work, but ``pyenv init`` doesn't seem to
+ # modify the Bash environment. ??? So, I hand-set the variables instead.
+ export PYENV_VERSION=$PYTHON
+ export PATH="/Users/travis/.pyenv/shims:${PATH}"
+ pyenv-virtualenv venv
+ source venv/bin/activate
+ # A manual check that the correct version of Python is running.
+ python --version
+ fi
install:
- pip install codecov
- pip install -r requirements.txt