Drop support for Python 2.6 (#590)
* Drop support for Python 2.6 * Re-organize Travis matrix
This commit is contained in:
committed by
GitHub
parent
248dc6c58d
commit
2e8d1bea64
36
.travis.yml
36
.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: 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
|
||||
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:
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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}
|
||||
|
||||
5
setup.py
5
setup.py
@@ -26,8 +26,8 @@ from setuptools import setup
|
||||
|
||||
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 @@ setup(
|
||||
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',
|
||||
|
||||
16
tox.ini
16
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
|
||||
|
||||
Reference in New Issue
Block a user