diff options
author | Scott Moser <smoser@brickies.net> | 2017-05-24 09:36:57 -0400 |
---|---|---|
committer | Scott Moser <smoser@brickies.net> | 2017-05-24 13:30:14 -0400 |
commit | 6b5369be71054a677b89fa8080f7ddd029ce4986 (patch) | |
tree | 4670717ec6fc99be5560b756b0cad78613fb73c8 | |
parent | fd0c88cf8e8aa015eadb5ab842e872cb627197ec (diff) | |
download | cloud-init-git-6b5369be71054a677b89fa8080f7ddd029ce4986.tar.gz |
tox/build: do not package depend on style requirements.
When the style/checking dependencies were updated in
test-requirements.txt, the debian package build dependencies created
by ./packages/bddeb were also updated. Pycodestyle was added to the list
in order to pin its version. That broke the package build for 16.04. The
reason for this is simply that python3-pycodestyle is not available in
16.04.
The change here is to remove style dependencies from test-requirements,
and add them to the tox environments directly. We had previously changed
the package build process to not run pep8 or flake8 simply to avoid having
to code to N different versions of style checkers (3bcb72c593f).
The link between package build and test-requirements still exists, though.
So future breakage can occur if any package is added to
test-requirements.txt (or requirements.txt) if the target distro release
does not have a python3-<packagename> in its archive.
There is also a bit of a tox.ini cleanup here, in that we do not have to
explictly list '-rrequirements.txt' as the setup.py pulls those in. And
lastly, we drop the -rtest-requirements.txt from the base 'testenv', and
add these test requirements only to environments that need to run test.
Finally, a change to packages/debian/control.in to drop the build
dependencies that were listed for style checking and also a dependency
on iproute2 which was a bad unit test that has been previously fixed.
-rw-r--r-- | packages/debian/control.in | 4 | ||||
-rw-r--r-- | test-requirements.txt | 6 | ||||
-rw-r--r-- | tox.ini | 20 |
3 files changed, 12 insertions, 18 deletions
diff --git a/packages/debian/control.in b/packages/debian/control.in index b58561e7..6c39d531 100644 --- a/packages/debian/control.in +++ b/packages/debian/control.in @@ -6,10 +6,6 @@ Maintainer: Scott Moser <smoser@ubuntu.com> Build-Depends: debhelper (>= 9), dh-python, dh-systemd, - iproute2, - pep8, - pyflakes, - python3-pyflakes | pyflakes (<< 1.1.0-2), ${python}, ${test_requires}, ${requires} diff --git a/test-requirements.txt b/test-requirements.txt index 1b39ea5c..d9d41b57 100644 --- a/test-requirements.txt +++ b/test-requirements.txt @@ -11,9 +11,3 @@ coverage # Only really needed on older versions of python contextlib2 setuptools - -# Used for syle checking -pycodestyle==2.3.1 -pyflakes==1.5.0 -flake8==3.3.0 -hacking==0.13.0 @@ -4,13 +4,16 @@ recreate = True [testenv] commands = python -m nose {posargs:tests/unittests} -deps = -r{toxinidir}/test-requirements.txt - -r{toxinidir}/requirements.txt setenv = LC_ALL = en_US.utf-8 [testenv:flake8] basepython = python3 +deps = + pycodestyle==2.3.1 + pyflakes==1.5.0 + flake8==3.3.0 + hacking==0.13.0 commands = {envpython} -m flake8 {posargs:cloudinit/ tests/ tools/} # https://github.com/gabrielfalcao/HTTPretty/issues/223 @@ -23,11 +26,17 @@ commands = {envpython} -m pylint {posargs:cloudinit} [testenv:py3] basepython = python3 +deps = -r{toxinidir}/test-requirements.txt commands = {envpython} -m nose {posargs:--with-coverage \ --cover-erase --cover-branches --cover-inclusive \ --cover-package=cloudinit tests/unittests} +[testenv:py27] +basepython = python2.7 +deps = -r{toxinidir}/test-requirements.txt + [testenv:py26] +deps = -r{toxinidir}/test-requirements.txt commands = nosetests {posargs:tests/unittests} setenv = LC_ALL = C @@ -39,8 +48,7 @@ exclude = .venv,.tox,dist,doc,*egg,.git,build,tools [testenv:doc] basepython = python3 -deps = {[testenv]deps} - sphinx +deps = sphinx commands = {envpython} -m sphinx {posargs:doc/rtd doc/rtd_html} [testenv:xenial] @@ -63,10 +71,6 @@ deps = nose==1.3.7 unittest2==1.1.0 contextlib2==0.5.1 - pep8==1.7.0 - pyflakes==1.1.0 - flake8==2.5.4 - hacking==0.10.2 [testenv:centos6] basepython = python2.6 |