curtin-dev team mailing list archive
-
curtin-dev team
-
Mailing list archive
-
Message #01783
[Merge] ~dbungert/curtin:no-py2 into curtin:master
Dan Bungert has proposed merging ~dbungert/curtin:no-py2 into curtin:master.
Commit message:
tox/make: drop py2 & trusty
Cleanup python2 targets ahead of python3-apt usage work
Requested reviews:
curtin developers (curtin-dev)
For more details, see:
https://code.launchpad.net/~dbungert/curtin/+git/curtin/+merge/407751
--
Your team curtin developers is requested to review the proposed merge of ~dbungert/curtin:no-py2 into curtin:master.
diff --git a/Makefile b/Makefile
index 187132c..08ac38b 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,5 @@
TOP := $(abspath $(dir $(lastword $(MAKEFILE_LIST))))
CWD := $(shell pwd)
-PYTHON2 ?= python2
PYTHON3 ?= python3
COVERAGE ?= 1
DEFAULT_COVERAGEOPTS = --with-coverage --cover-erase --cover-branches --cover-package=curtin --cover-inclusive
@@ -28,26 +27,15 @@ coverage: unittest
pep8:
@$(CWD)/tools/run-pep8
-pyflakes:
- $(PYTHON2) -m pyflakes $(target_dirs)
-
-pyflakes3:
+pyflakes pyflakes3:
$(PYTHON3) -m pyflakes $(target_dirs)
-pylint:
- $(PYTHON2) -m pylint $(pylintopts) $(target_dirs)
-
-pylint3:
+pylint pylint3:
$(PYTHON3) -m pylint $(pylintopts) $(target_dirs)
-unittest2:
- $(PYTHON2) -m nose $(coverageopts) $(noseopts) tests/unittests
-
-unittest3:
+unittest unittest3:
$(PYTHON3) -m nose $(coverageopts) $(noseopts) tests/unittests
-unittest: unittest2 unittest3
-
schema-validate:
@$(CWD)/tools/schema-validate-storage
diff --git a/tox.ini b/tox.ini
index 04b43b6..be48e85 100644
--- a/tox.ini
+++ b/tox.ini
@@ -3,14 +3,11 @@ minversion = 1.6
skipsdist = True
envlist =
py3-flake8,
- py27,
py3,
py3-pyflakes,
py3-pylint,
- py27-pylint,
- trusty-py27,
block-schema,
- xenial-py3
+ xenial
[tox:jenkins]
downloadcache = ~/cache/pip
@@ -22,29 +19,13 @@ setenv = VIRTUAL_ENV={envdir}
LC_ALL = en_US.utf-8
deps = -r{toxinidir}/test-requirements.txt
-r{toxinidir}/requirements.txt
-commands = {envpython} {toxinidir}/tools/noproxy nosetests \
+commands = {envpython} -m nose \
{posargs:--with-coverage --cover-erase --cover-branches \
--cover-package=curtin --cover-inclusive tests/unittests}
[testenv:py3]
basepython = python3
-[testenv:py27]
-basepython = python2.7
-# https://github.com/pypa/setuptools/issues/1963
-deps = {[testenv]deps}
- setuptools<45
-
-# tox uses '--pre' by default to pip install. We don't want that, and
-# 'pip_pre=False' isn't available until tox version 1.9.
-install_command = pip install {opts} {packages}
-
-[testenv:py2-flake8]
-basepython = python2
-deps = {[testenv]deps}
- flake8
-commands = {envpython} -m flake8 {posargs:curtin}
-
[testenv:py3-flake8]
basepython = python3
deps = {[testenv]deps}
@@ -64,14 +45,6 @@ deps = {[testenv]deps}
git+https://git.launchpad.net/simplestreams
commands = {envpython} -m pylint --errors-only {posargs:curtin tests/vmtests}
-[testenv:py27-pylint]
-# set basepython because tox 1.6 (trusty) does not support generated environments
-basepython = python2.7
-deps = {[testenv]deps}
- {[testenv:py27]deps}
- pylint==1.8.1
-commands = {envpython} -m pylint --errors-only {posargs:curtin}
-
[testenv:docs]
deps = {[testenv]deps}
sphinx
@@ -84,56 +57,14 @@ basepython = python3
commands =
{toxinidir}/tools/schema-validate-storage
-[testenv:trusty]
-# this environment provides roughly a trusty build environment where
-# where 'make check' is run during package build. This protects against
-# package build errors on trusty where pep8 and pyflakes there have subtly
-# different behavior. Note, we do only run pyflakes3, though.
-deps = pyflakes==0.8.1
- pep8==1.4.6
- mock==1.0.1
- nose==1.3.1
- pyyaml==3.10
- oauthlib==0.6.1
-
-[testenv:trusty-check]
-deps = {[testenv:trusty]deps}
-basepython = python3
-commands =
- {toxinidir}/tools/run-pyflakes3 {posargs}
-
-[testenv:trusty-py27]
-deps = {[testenv:trusty]deps}
- setuptools<45
-
-basepython = python2.7
-commands = {envpython} {toxinidir}/tools/noproxy nosetests \
- {posargs:tests/unittests}
-
-[testenv:trusty-py3]
-deps = {[testenv:trusty]deps}
-basepython = python3
-commands = {envpython} {toxinidir}/tools/noproxy nosetests \
- {posargs:tests/unittests}
-
[testenv:xenial]
deps =
mock==1.3.0
nose==1.3.7
pyyaml==3.11
oauthlib==1.0.3
-
-[testenv:xenial-py27]
-basepython = python27
-deps = {[testenv:xenial]deps}
- {[testenv:py27]deps}
-commands = {envpython} {toxinidir}/tools/noproxy nosetests \
- {posargs:tests/unittests}
-
-[testenv:xenial-py3]
basepython = python3
-deps = {[testenv:xenial]deps}
-commands = {envpython} {toxinidir}/tools/noproxy nosetests \
+commands = {envpython} -m nose \
{posargs:tests/unittests}
[testenv:tip-pycodestyle]
Follow ups