-
Committer:
Barry Warsaw
-
Date:
2013-04-16 23:06:59 UTC
-
mto:
This revision was merged to the branch mainline in
revision
28.
-
Revision ID:
barry@python.org-20130416230659-lsfa89hetroszunu
Get the tests to run under tox so that we can ensure they pass under Python
2.6, 2.7, 3.2, and 3.3. Among the changes necessary include:
* MANIFEST.in: be sure the debian/ directory ends up in the sdist.
* Python 2.6 does not have subprocess.check_output(), so steal the code from
Python 2.7 if the import fails.
* Ugly hack around the fact that TarFile.add() does not accept a `filter`
option in Python 2.6.
* Work around the fact that in Python 2.6, the tarfile path names don't start
with ./
* Use contextlib.closing() everywhere, but handle the fact that in the PyPI
version of python-debian, the DebFile class does not have a .close()
method.
* In Python 3.3, we have shutil.which().
* Use unittest2 in Python 2.6.
* We can't use nested context manager syntax in Python 2.6. I don't want to
use contextlib.nested() here either because that's gone in Python 3.3.
* Restore some %s usage as per Colin's preferences.
* Use pkg_resources to find the pep8/pylint directory to start scanning,
otherwise tests fail in a virtualenv (i.e. tox).
* Simplify ./run-tests, though we don't really need it.
* Make the setup.py install some additional requirements.
* Add a tox.ini
* Add some __all__'s