[Python-modules-commits] [pastewebkit] 02/06: Rewrite debian/rules using the dh sequencer and pybuild.

Mattia Rizzolo mattia at debian.org
Sun Apr 2 19:18:14 UTC 2017


This is an automated email from the git hooks/post-receive script.

mattia pushed a commit to branch master
in repository pastewebkit.

commit 855ff8ac3adc8f0f4dc78943b0bf2902d3a46233
Author: Mattia Rizzolo <mattia at debian.org>
Date:   Sun Apr 2 21:10:31 2017 +0200

    Rewrite debian/rules using the dh sequencer and pybuild.
    
    Closes: #833227
    Signed-off-by: Mattia Rizzolo <mattia at debian.org>
---
 debian/control |  2 +-
 debian/dirs    |  1 -
 debian/links   |  1 +
 debian/rules   | 63 ++++++++++------------------------------------------------
 4 files changed, 13 insertions(+), 54 deletions(-)

diff --git a/debian/control b/debian/control
index 7c1ef0e..45d6419 100644
--- a/debian/control
+++ b/debian/control
@@ -5,7 +5,7 @@ Maintainer: Piotr Ożarowski <piotr at debian.org>
 Uploaders: Debian Python Modules Team <python-modules-team at lists.alioth.debian.org>
 Build-Depends: debhelper (>= 10)
 Build-Depends-Indep: python-all (>= 2.6.6-3),
- python-setuptools (>= 0.6b3-1~), python-docutils
+ python-setuptools (>= 0.6b3-1~), python-docutils, dh-python
 Standards-Version: 3.9.2
 Homepage: http://pythonpaste.org/webkit/
 Vcs-Git: https://anonscm.debian.org/git/python-modules/packages/pastewebkit.git
diff --git a/debian/dirs b/debian/dirs
deleted file mode 100644
index fcfbf69..0000000
--- a/debian/dirs
+++ /dev/null
@@ -1 +0,0 @@
-/usr/share/doc/python-pastewebkit/docs
diff --git a/debian/links b/debian/links
new file mode 100644
index 0000000..cfac24f
--- /dev/null
+++ b/debian/links
@@ -0,0 +1 @@
+usr/share/doc/python-pastewebkit/docs usr/share/doc/python-paste/docs/webkit
diff --git a/debian/rules b/debian/rules
index 556994d..42ca2e1 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,59 +1,18 @@
 #!/usr/bin/make -f
 
-#export DH_VERBOSE=1
-
-PYVERS=$(shell pyversions -vr)
 DOCS=$(shell cd docs && find ./ -name "*.txt" -printf "%p " | sed "s/.txt//g")
-PKGDIR=$(CURDIR)/debian/python-pastewebkit
-include /usr/share/python/python.mk
+docdir=debian/python-pastewebkit/usr/share/doc/python-pastewebkit/docs/
 
-clean:
-	dh_testdir
-	dh_testroot
-	rm -rf dist build
-	find . -name '*\.py[co]' -delete
-	dh_clean build-docs $(PYVERS:%=install-python%)
+export PYBUILD_NAME=paste
+export PYBUILD_DESTDIR_python2=debian/python-pastewebkit/
 
-build: build-indep
-build-indep: build-docs
-build-arch:
+%:
+	dh $@ --with python2 --buildsystem pybuild
 
-build-docs:
-	dh_installdirs
-	for NAME in $(DOCS); do \
-	    rst2html --cloak-email-addresses --no-toc-backlinks "docs/$$NAME.txt" \
-	      > "debian/python-pastewebkit/usr/share/doc/python-pastewebkit/docs/$$NAME.html"; \
+override_dh_installdocs:
+	dh_installdocs
+	mkdir -pv $(docdir)
+	set -e ; for NAME in $(DOCS); do \
+		rst2html --cloak-email-addresses --no-toc-backlinks "docs/$$NAME.txt" \
+			> "$(docdir)$$NAME.html"; \
 	done
-	touch $@
-
-install: build $(PYVERS:%=install-python%)
-	dh_install
-
-install-python%:
-	python$* setup.py install --root $(PKGDIR) \
-		--single-version-externally-managed $(py_setup_install_args)
-	# pth file is not needed since all paste* packages are installed in same directory
-	find $(PKGDIR) \( -name '*.pth' -or -name 'namespace_packages.txt' \) -delete
-	# installed to /usr/share/paster_templates/ via dh_install
-	rm -rf debian/python-pastewebkit/usr/lib/python$*/site-packages/paste/webkit/paster_templates/
-	rm -rf $(PKGDIR)$(call py_libdir,$*)/paste/webkit/paster_templates
-
-binary-indep: build install
-	dh_testdir -i
-	dh_testroot -i
-	dh_installchangelogs -i
-	dh_installdocs -i
-	dh_link usr/share/doc/python-pastewebkit/docs /usr/share/doc/python-paste/docs/webkit
-	dh_python2 -i
-	dh_compress -i -X.py
-	dh_fixperms -i
-	dh_installdeb -i
-	dh_gencontrol -i
-	dh_md5sums -i
-	dh_builddeb -i -- -Z bzip2
-
-binary-arch:
-
-binary: binary-indep binary-arch
-
-.PHONY: build build-arch build-indep binary binary-arch binary-indep clean install

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/pastewebkit.git



More information about the Python-modules-commits mailing list