[Python-apps-commits] r9259 - in packages/tox/trunk/debian (9 files)

warsaw-guest at users.alioth.debian.org warsaw-guest at users.alioth.debian.org
Fri Nov 16 22:48:29 UTC 2012


    Date: Friday, November 16, 2012 @ 22:48:27
  Author: warsaw-guest
Revision: 9259

Changes based on comments by Paul Tagliamonte:

* Removed redundant Section header.
* Since this is the initial release, trim the changelog.
* d/rules: Add override_dh_auto_test to run the tox test suite, albeit only
  against the default python2.

Also:

* d/p/test-problems.patch: work around some issues related to running the
  tests suite in an sbuild environment.
* Initial layout for autopkgtest/DEP8 test suite, but currently disabled due
  to problems in my build environment.
* Update d/copyright.

Added:
  packages/tox/trunk/debian/patches/test-problems.patch
  packages/tox/trunk/debian/tests/
  packages/tox/trunk/debian/tests/built
  packages/tox/trunk/debian/tests/control
Modified:
  packages/tox/trunk/debian/changelog
  packages/tox/trunk/debian/control
  packages/tox/trunk/debian/copyright
  packages/tox/trunk/debian/patches/series
  packages/tox/trunk/debian/rules

Modified: packages/tox/trunk/debian/changelog
===================================================================
--- packages/tox/trunk/debian/changelog	2012-11-15 10:09:43 UTC (rev 9258)
+++ packages/tox/trunk/debian/changelog	2012-11-16 22:48:27 UTC (rev 9259)
@@ -1,23 +1,5 @@
 tox (1.4.2-1) UNRELEASED; urgency=low
 
-  [ Bradley M. Froehle ]
   * Initial release. (Closes: #664759)
 
-  [ Barry Warsaw ]
-  * debian/watch: Added
-  * debian/control:
-    + wrap-and-sort
-    + Add to B-D: python-py and python-pkg-resources to silence lintian.
-    + Add to B-D: python-doc for quilt patch to avoid trying to download
-      the intersphinx object inventory.  For more details, see:
-      http://lists.debian.org/debian-python/2011/07/msg00016.html
-    + Add X-Python-Version.
-  * debian/patches/intersphinx_mapping.patch: Patch to use python-doc's
-    objects.inv file; see above link for details.
-  * debian/patches/fix-doctree.patch: Removes nonexistent document
-    referenced from index.txt.
-  * debian/patches/upstream-issue58.patch: Fix typos in LICENSE file.
-  * debian/manpage/*, debian/rules: Install tox.1 manpage.
-  * debian/python-tox.pyremove: Don't ship tox-*.egg-info/SOURCES.txt
-
  -- Barry Warsaw <barry at python.org>  Fri, 09 Nov 2012 18:07:19 -0500

Modified: packages/tox/trunk/debian/control
===================================================================
--- packages/tox/trunk/debian/control	2012-11-15 10:09:43 UTC (rev 9258)
+++ packages/tox/trunk/debian/control	2012-11-16 22:48:27 UTC (rev 9259)
@@ -17,10 +17,10 @@
 Vcs-Svn: svn://svn.debian.org/python-apps/packages/tox/trunk/
 Vcs-Browser: http://svn.debian.org/viewsvn/python-apps/packages/tox/trunk/
 X-Python-Version: >= 2.6
+#XS-Testsuite: autopkgtest
 
 Package: python-tox
 Architecture: all
-Section: python
 Depends: python-pkg-resources,
          ${misc:Depends},
          ${python:Depends},

Modified: packages/tox/trunk/debian/copyright
===================================================================
--- packages/tox/trunk/debian/copyright	2012-11-15 10:09:43 UTC (rev 9258)
+++ packages/tox/trunk/debian/copyright	2012-11-16 22:48:27 UTC (rev 9259)
@@ -19,7 +19,7 @@
 Copyright: 2012 Bradley Froehle <brad.froehle at gmail.com>
 License: GPL-2+
 
-Files: debian/watch files/manpage/*
+Files: debian/watch debian/tests/* files/manpage/*
 Copyright: 2012 Barry Warsaw <barry at python.org>
 License: GPL-2+
 

Modified: packages/tox/trunk/debian/patches/series
===================================================================
--- packages/tox/trunk/debian/patches/series	2012-11-15 10:09:43 UTC (rev 9258)
+++ packages/tox/trunk/debian/patches/series	2012-11-16 22:48:27 UTC (rev 9259)
@@ -1,3 +1,4 @@
 intersphinx_mapping.patch
 fix-doctree.patch
 upstream-issue58.patch
+test-problems.patch

Added: packages/tox/trunk/debian/patches/test-problems.patch
===================================================================
--- packages/tox/trunk/debian/patches/test-problems.patch	                        (rev 0)
+++ packages/tox/trunk/debian/patches/test-problems.patch	2012-11-16 22:48:27 UTC (rev 9259)
@@ -0,0 +1,30 @@
+Description: Fix various problems in the test suite, which become evident in
+ an sbuild and other builder environments. 
+ + In an sbuild environment, $USER will not match $HOME.
+ + argv[0] should not contribute to test string.
+Author: Barry Warsaw <barry at python.org>
+Bug: https://bitbucket.org/hpk42/tox/issue/60/home-does-not-always-equal-user
+Bug: https://bitbucket.org/hpk42/tox/issue/61/test-incorrectly-includes-argv-0
+
+--- a/tests/test_config.py
++++ b/tests/test_config.py
+@@ -429,7 +429,7 @@
+         assert argv[3][0] == conf.envbindir
+         assert argv[4][0] == conf.envtmpdir
+         assert argv[5][0] == conf.envpython
+-        assert argv[6][0] == os.path.expanduser("~")
++        assert argv[6][0] == os.environ['HOME']
+         assert argv[7][0] == config.homedir.join(".tox", "distshare")
+         assert argv[8][0] == conf.envlogdir
+ 
+--- a/tests/test_venv.py
++++ b/tests/test_venv.py
+@@ -189,7 +189,7 @@
+     venv.install_deps()
+     # two different index servers, two calls
+     assert len(l) == 2
+-    args = " ".join(l[0].args)
++    args = " ".join(l[0].args[1:])
+     assert "-i" not in args
+     assert "dep1" in args
+ 

Modified: packages/tox/trunk/debian/rules
===================================================================
--- packages/tox/trunk/debian/rules	2012-11-15 10:09:43 UTC (rev 9258)
+++ packages/tox/trunk/debian/rules	2012-11-16 22:48:27 UTC (rev 9259)
@@ -1,5 +1,13 @@
 #!/usr/bin/make -f
 
+PYTHON2=$(shell pyversions -dv)
+#PYTHON3=$(shell py3versions -sv)
+
+# $HOME must exist for tox to be happy, but an sbuild environment sets it to a
+# non-existent directory.  Use this tempdir as the fake $HOME for testing
+# purposes.
+FAKEHOME=$(shell mktemp -dq)
+
 %:
 	dh $@ --buildsystem=python_distutils --with=python2,sphinxdoc
 
@@ -20,3 +28,17 @@
 	rm -rf build
 	rm -rf *.egg-info
 	rm -rf debian/manpage/_build
+
+# $HOME must exist for tox to be happy.  Also, because the tox(1) script
+# doesn't exist until the package is installed (although I suppose we could
+# run it out of the built location), invoke the main() function explicitly.
+ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
+test-python%:
+	HOME=$(FAKEHOME) python$* -c 'from tox._cmdline import main; main(["-e", "py"+"$*".replace(".", "")])'
+
+override_dh_auto_test: $(PYTHON2:%=test-python%) $(PYTHON3:%=test-python%)
+endif
+
+get-orig-source:
+	uscan --noconf --force-download --repack --rename \
+		--download-current-version --verbose

Added: packages/tox/trunk/debian/tests/built
===================================================================
--- packages/tox/trunk/debian/tests/built	                        (rev 0)
+++ packages/tox/trunk/debian/tests/built	2012-11-16 22:48:27 UTC (rev 9259)
@@ -0,0 +1,20 @@
+#!/usr/bin/python3
+
+# autopkgtest check: Run the upstream tox tests using tox itself.  We control
+# the test environment though, since the list of upstream supported Python
+# versions may not match the list of installed Python versions.
+
+from subprocess import check_output
+
+py2versions = check_output(['pyversions', '-iv']).splitlines()
+py3versions = check_output(['py3versions', '-iv']).splitlines()
+
+pyenvs = [
+    'py' + version.decode('us-ascii').replace('.', '')
+    for version in py2versions + py3versions
+    ]
+
+command = ['tox', '-e']
+command.extend(pyenvs)
+
+check_output(command)

Added: packages/tox/trunk/debian/tests/control
===================================================================
--- packages/tox/trunk/debian/tests/control	                        (rev 0)
+++ packages/tox/trunk/debian/tests/control	2012-11-16 22:48:27 UTC (rev 9259)
@@ -0,0 +1,2 @@
+Tests: built
+Depends: python-all, python3-all, @




More information about the Python-apps-commits mailing list