From c412d47a05aac66b40d0039e69c7066a548da6f1 Mon Sep 17 00:00:00 2001 From: Denis Bilenko Date: Tue, 17 Dec 2013 17:54:37 +0100 Subject: [PATCH] travis: On Python3 use python3-version of pep8 #38 Previously pep8 and pyflakes were installed using the default system Python. This changes 'make travis' to use the current Python version for those scripts as well. This affects pep8, at least: on Python3 it complains about space in `print (...)`. --- .travis.yml | 12 ++++++------ Makefile | 16 ++++++++-------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/.travis.yml b/.travis.yml index 263d24a38..e0cb8c55f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,11 +1,11 @@ language: python -env: - - PYTHONVER=2.6 - - PYTHONVER=2.7 - - PYTHONVER=3.3 +python: + - "2.6" + - "2.7" + - "3.3" matrix: allow_failures: - - env: PYTHONVER=3.3 -script: sudo -E make travis + - python: "3.3" +script: make travis notifications: email: false diff --git a/Makefile b/Makefile index bd1fedf19..07f912701 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ # This file is renamed to "Makefile.ext" in release tarballs so that setup.py won't try to # run it. If you want setup.py to run "make" automatically, rename it back to "Makefile". -PYTHON ?= python${PYTHONVER} +PYTHON ?= python${TRAVIS_PYTHON_VERSION} CYTHON ?= cython all: gevent/gevent.core.c gevent/gevent.ares.c gevent/gevent._semaphore.c gevent/gevent._util.c @@ -37,10 +37,10 @@ whitespace: ! find . -not -path "./.git/*" -not -path "./build/*" -not -path "./libev/*" -not -path "./c-ares/*" -not -path "./doc/_build/*" -type f | xargs egrep -l " $$" pep8: - pep8 . + ${PYTHON} `which pep8` . pyflakes: - util/pyflakes.py + ${PYTHON} util/pyflakes.py lint: whitespace pep8 pyflakes @@ -62,10 +62,10 @@ travis: make whitespace pip install -q pep8 - make pep8 + PYTHON=python make pep8 pip install -q pyflakes - make pyflakes + PYTHON=python make pyflakes sudo add-apt-repository -y ppa:chris-lea/cython sudo apt-get -qq -y update @@ -77,11 +77,11 @@ travis: ack -w subprocess greentest/ -l -v | python -c 'import sys; print "\n".join(line.split("/")[-1].strip() for line in sys.stdin)' > greentest/tests_that_dont_use_subprocess.txt - make travistest + sudo -E make travistest - apt-get install ${PYTHON}-dbg + sudo -E apt-get install ${PYTHON}-dbg - PYTHON=${PYTHON}-dbg GEVENTSETUP_EV_VERIFY=3 make travistest + sudo -E PYTHON=${PYTHON}-dbg GEVENTSETUP_EV_VERIFY=3 make travistest .PHONY: clean all doc pep8 whitespace pyflakes lint travistest travis