[Python-modules-commits] r20506 - in packages/python-pipeline/trunk/debian (3 files)

jwilk at users.alioth.debian.org jwilk at users.alioth.debian.org
Sun Feb 19 01:08:50 UTC 2012


    Date: Sunday, February 19, 2012 @ 01:08:49
  Author: jwilk
Revision: 20506

Rewrite debian/rules from scratch, without using dh.

Modified:
  packages/python-pipeline/trunk/debian/changelog
  packages/python-pipeline/trunk/debian/control
  packages/python-pipeline/trunk/debian/rules

Modified: packages/python-pipeline/trunk/debian/changelog
===================================================================
--- packages/python-pipeline/trunk/debian/changelog	2012-02-19 00:52:03 UTC (rev 20505)
+++ packages/python-pipeline/trunk/debian/changelog	2012-02-19 01:08:49 UTC (rev 20506)
@@ -12,8 +12,10 @@
     + Remove Uploaders.
   * Fix the watch file.
   * Fix DEP-5 format URI.
+  * Rewrite debian/rules from scratch, without using dh.
+    + Reduce build-dependency on debhelper to >= 7.
 
- -- Jakub Wilk <jwilk at debian.org>  Sun, 19 Feb 2012 01:45:57 +0100
+ -- Jakub Wilk <jwilk at debian.org>  Sun, 19 Feb 2012 02:07:40 +0100
 
 python-pipeline (0.1.3-2) unstable; urgency=low
 

Modified: packages/python-pipeline/trunk/debian/control
===================================================================
--- packages/python-pipeline/trunk/debian/control	2012-02-19 00:52:03 UTC (rev 20505)
+++ packages/python-pipeline/trunk/debian/control	2012-02-19 01:08:49 UTC (rev 20506)
@@ -2,7 +2,7 @@
 Section: python
 Priority: optional
 Maintainer: Debian QA Group <packages at qa.debian.org>
-Build-Depends: debhelper (>= 7.0.50~), python-all, python3-all (>= 3.1.2-7~), python-support (>= 0.6.4)
+Build-Depends: debhelper (>= 7), python-all, python3-all (>= 3.1.2-7~), python-support (>= 0.6.4)
 Standards-Version: 3.9.2
 XS-Python-Version: >= 2.4
 X-Python3-Version: >= 3.0

Modified: packages/python-pipeline/trunk/debian/rules
===================================================================
--- packages/python-pipeline/trunk/debian/rules	2012-02-19 00:52:03 UTC (rev 20505)
+++ packages/python-pipeline/trunk/debian/rules	2012-02-19 01:08:49 UTC (rev 20506)
@@ -2,6 +2,9 @@
 
 include /usr/share/python3/python.mk
 
+python_all = pyversions -r $(CURDIR)/debian/control | tr ' ' '\n' | xargs -t -I {} env {}
+python3_all = $(patsubst py%,py3%,$(python_all))
+
 here = $(dir $(firstword $(MAKEFILE_LIST)))/..
 upstream_version = $(shell cd $(here) && dpkg-parsechangelog | sed -n -r -e '/^Version: ([0-9.]+).*/ { s//\1/p }')
 upstream_url_py2 = $(shell cd $(here) && uscan --dehs --download-version="$(upstream_version)" | sed -n -r -e '/<upstream-url>(.*)<.*/ { s//\1/p }')
@@ -12,39 +15,45 @@
 	wget $(upstream_url_py2) -O python-pipeline_$(upstream_version).orig.tar.gz
 	wget $(upstream_url_py3) -O python-pipeline_$(upstream_version).orig-py3k.tar.gz
 
-.PHONY: override_dh_auto_clean
-override_dh_auto_clean:
-	rm -rf py3k/build/
-	dh_auto_clean
+.PHONY: clean
+clean:
+	dh_testdir
+	dh_clean
+	rm -rf build/ py3k/build/
+	find -name '*.py[co]' -delete
 
-.PHONY: override_dh_auto_install
-override_dh_auto_install:
-	dh_auto_install
-	cd py3k && python3 setup.py install $(py_setup_install_args) --root=$(CURDIR)/debian/tmp
+.PHONY: build build-arch build-indep
+build build-indep: build-stamp
 
-.PHONY: override_dh_pysupport
-override_dh_pysupport:
-	dh_pysupport -p python-pipeline
-	dh_python3 -p python3-pipeline
-
-.PHONY: override_dh_auto_test
-override_dh_auto_test:
+build-stamp:
+	dh_testdir
+	python setup.py build
+	cd py3k && python3 setup.py build
 ifeq ($(filter nocheck,$(DEB_BUILD_OPTIONS)),)
 	set -e -x; \
-	for python in $(shell pyversions -r); do \
-		$$python -c 'import pipeline as p, doctest as d; d.testmod(p, report=1)'; \
-	done
-	cd py3k && set -e -x; \
-	for python3 in $(shell py3versions -r); do \
-		$$python3 -c 'import pipeline as p, doctest as d; d.testmod(p, report=1)'; \
-	done
+	$(python_all) -c 'import pipeline as p, doctest as d; d.testmod(p, report=1)'
+	cd py3k && \
+		$(python3_all) -c 'import pipeline as p, doctest as d; d.testmod(p, report=1)'
 endif
+	touch $(@)
 
-.PHONY: build build-arch build-indep binary binary-arch binary-indep clean
-build binary binary-indep clean:
-	dh $(@)
-build-indep: build
-build-arch binary-arch:
-	# Nothing to do.
+.PHONY: binary binary-arch binary-indep
+binary binary-indep: build-stamp
+	dh_testdir
+	dh_testroot
+	dh_prep
+	python setup.py install $(py_setup_install_args) --root=$(CURDIR)/debian/tmp
+	cd py3k && python3 setup.py install $(py_setup_install_args) --root=$(CURDIR)/debian/tmp
+	dh_install
+	dh_installdocs
+	dh_installchangelogs
+	dh_pysupport -p python-pipeline
+	dh_python3 -p python3-pipeline
+	dh_compress
+	dh_fixperms
+	dh_installdeb
+	dh_gencontrol
+	dh_md5sums
+	dh_builddeb
 
 # vim:ts=4 sw=4 noet




More information about the Python-modules-commits mailing list