diff --git a/.travis.yml b/.travis.yml index a8c01faa2..9ab2f44e1 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,29 +1,35 @@ language: python -python: 2.7 sudo: false -# TODO(issue 532): Fix syntax when 3.5 is natively available upstream + matrix: include: - - python: 3.5 - env: - - TOX_ENV=py35 + - python: 2.7 + env: TOX_ENV=flake8 + - python: 2.7 + env: TOX_ENV=docs + - python: 2.7 + env: TOX_ENV=gae + - python: 2.7 + env: TOX_ENV=py27 + - python: 3.3 + env: TOX_ENV=py33 + - python: 3.4 + env: TOX_ENV=py34 + - python: 3.5 + env: TOX_ENV=py35 + - python: pypy + env: TOX_ENV=pypy + - python: 2.7 + env: TOX_ENV=system-tests + - python: 3.4 + env: TOX_ENV=system-tests3 env: - matrix: - - TOX_ENV=py26 - - TOX_ENV=py27 - - TOX_ENV=py33 - - TOX_ENV=py34 - - TOX_ENV=pypy - - TOX_ENV=docs - - TOX_ENV=system-tests - - TOX_ENV=system-tests3 - - TOX_ENV=gae - - TOX_ENV=flake8 global: - GAE_PYTHONPATH=${HOME}/.cache/google_appengine cache: directories: - ${HOME}/.cache + - ${HOME}/.pyenv install: - ./scripts/install.sh script: diff --git a/README.md b/README.md index 17e69fcbc..e1b824bb5 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ agreement. Supported Python Versions ========================= -We support Python 2.6, 2.7, 3.3+. More information [in the docs][2]. +We support Python 2.7 and 3.3+. More information [in the docs][2]. [1]: https://github.com/google/oauth2client/blob/master/CONTRIBUTING.md [2]: https://oauth2client.readthedocs.io/#supported-python-versions diff --git a/docs/index.rst b/docs/index.rst index 0543e1aad..6ae6621d2 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -107,7 +107,7 @@ contributor license agreement. Supported Python Versions ------------------------- -We support Python 2.6, 2.7, 3.3+. (Whatever this file says, the truth is +We support Python 2.7 and 3.3+. (Whatever this file says, the truth is always represented by our `tox.ini`_). .. _tox.ini: https://github.com/google/oauth2client/blob/master/tox.ini diff --git a/scripts/install.sh b/scripts/install.sh index 0ef7ad2ba..1f2378bc6 100755 --- a/scripts/install.sh +++ b/scripts/install.sh @@ -17,15 +17,14 @@ set -ev pip install tox -if [[ "${TOX_ENV}" == "pypy" ]]; then - git clone https://github.com/yyuu/pyenv.git ${HOME}/.pyenv - PYENV_ROOT="${HOME}/.pyenv" - PATH="${PYENV_ROOT}/bin:${PATH}" - eval "$(pyenv init -)" - pyenv install pypy-2.6.0 - pyenv global pypy-2.6.0 -fi +# App Engine tests require the App Engine SDK. if [[ "${TOX_ENV}" == "gae" && ! -d ${GAE_PYTHONPATH} ]]; then python scripts/fetch_gae_sdk.py `dirname ${GAE_PYTHONPATH}` fi + +# Travis ships with an old version of PyPy, so install at least version 2.6. +if [[ "${TOX_ENV}" == "pypy" ]]; then + git clone https://github.com/yyuu/pyenv.git ${HOME}/.pyenv + ${HOME}/.pyenv/bin/pyenv install pypy-2.6.0 +fi diff --git a/scripts/run.sh b/scripts/run.sh index 0b537e241..c774f2489 100755 --- a/scripts/run.sh +++ b/scripts/run.sh @@ -16,10 +16,11 @@ set -ev +# If in the pypy environment, activate the never version of pypy provided by +# pyenv. if [[ "${TOX_ENV}" == "pypy" ]]; then - PYENV_ROOT="${HOME}/.pyenv" - PATH="${PYENV_ROOT}/bin:${PATH}" - eval "$(pyenv init -)" - pyenv global pypy-2.6.0 + PATH="${HOME}/.pyenv/versions/pypy-2.6.0/bin:${PATH}" + export PATH fi + tox -e ${TOX_ENV} diff --git a/setup.py b/setup.py index 686d1db72..3d9212c1f 100644 --- a/setup.py +++ b/setup.py @@ -26,8 +26,8 @@ import oauth2client -if sys.version_info < (2, 6): - print('oauth2client requires python2 version >= 2.6.', file=sys.stderr) +if sys.version_info < (2, 7): + print('oauth2client requires python2 version >= 2.7.', file=sys.stderr) sys.exit(1) if (3, 1) <= sys.version_info < (3, 3): print('oauth2client requires python3 version >= 3.3.', file=sys.stderr) @@ -58,7 +58,6 @@ keywords="google oauth 2.0 http client", classifiers=[ 'Programming Language :: Python :: 2', - 'Programming Language :: Python :: 2.6', 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.3', diff --git a/tox.ini b/tox.ini index b0781a8a1..31a638e71 100644 --- a/tox.ini +++ b/tox.ini @@ -1,5 +1,5 @@ [tox] -envlist = py26,py27,py33,py34,py35,pypy,gae,cover +envlist = py27,py33,py34,py35,pypy,gae,cover [testenv] basedeps = mock>=1.3.0 @@ -50,20 +50,6 @@ deps = {[testenv]deps} coverage nosegae -[testenv:py26] -basepython = - python2.6 -commands = - nosetests \ - --ignore-files=test_appengine\.py \ - --ignore-files=test__appengine_ndb\.py \ - --ignore-files=test_keyring_storage\.py \ - --exclude-dir=oauth2client/contrib/django_util \ - --exclude-dir=tests/contrib/django_util \ - {posargs} -deps = {[testenv]basedeps} - nose-exclude - [testenv:py33] basepython = python3.3