[Python-modules-commits] r20317 - in packages/python-docutils/trunk/debian (changelog rules)

jwilk at users.alioth.debian.org jwilk at users.alioth.debian.org
Sat Feb 4 23:11:04 UTC 2012


    Date: Saturday, February 4, 2012 @ 23:11:03
  Author: jwilk
Revision: 20317

Use xargs to iterate over all Python versions.

Modified:
  packages/python-docutils/trunk/debian/changelog
  packages/python-docutils/trunk/debian/rules

Modified: packages/python-docutils/trunk/debian/changelog
===================================================================
--- packages/python-docutils/trunk/debian/changelog	2012-02-04 22:50:59 UTC (rev 20316)
+++ packages/python-docutils/trunk/debian/changelog	2012-02-04 23:11:03 UTC (rev 20317)
@@ -14,6 +14,7 @@
     (closes: #653769). Thanks to Jari Aalto for the bug report.
   * Update Subversion repository URLs in patch headers (so that they point to
     SourceForge rather than BerliOS).
+  * Use xargs to iterate over all Python versions.
 
  -- Jakub Wilk <jwilk at debian.org>  Sat, 31 Dec 2011 19:46:09 +0100
 

Modified: packages/python-docutils/trunk/debian/rules
===================================================================
--- packages/python-docutils/trunk/debian/rules	2012-02-04 22:50:59 UTC (rev 20316)
+++ packages/python-docutils/trunk/debian/rules	2012-02-04 23:11:03 UTC (rev 20317)
@@ -20,6 +20,9 @@
 pre_strip_images2 = 's,<img alt="([^"]*)"[^>]*\bsrc="http://[^"]+"[^>]*>,$$1,g;'
 pre_strip_images = $(pre_strip_images1)$(pre_strip_images2)
 
+python_all = pyversions -r $(CURDIR)/debian/control | tr ' ' '\n' | xargs -t -I {} env {}
+python3_all = $(patsubst py%,py3%,$(python_all))
+
 build build-indep: build-stamp
 build-stamp:
 	dh_testdir
@@ -35,15 +38,9 @@
 	python3 setup.py build --build-lib=build/py3/
 ifeq ($(filter nocheck,$(DEB_BUILD_OPTIONS)),)
 	# Run test suite for Python 2.X:
-	set -ex && cd build/py2/ && \
-	for python in $(shell pyversions -r); do \
-		$$python ../../test/alltests.py; \
-	done
+	cd build/py2/ && $(python_all) ../../test/alltests.py
 	# Run test suite for Python 3.X:
-	set -ex && cd build/py3/ && \
-	for python in $(shell py3versions -r); do \
-		$$python test/alltests.py; \
-	done
+	cd build/py3/ && $(python3_all) test/alltests.py
 endif
 	# Build documentation:
 	PYTHONPATH=.:extras python tools/buildhtml.py \




More information about the Python-modules-commits mailing list