[Python-modules-commits] [python-gmpy2] 01/01: Switch to pybuild

Martin Kelly aomighty-guest at moszumanska.debian.org
Thu Dec 3 04:47:47 UTC 2015


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

aomighty-guest pushed a commit to branch master
in repository python-gmpy2.

commit d402c54dffdfeccf16098a7bbdda3b1e164f11a8
Author: Martin Kelly <martin at martingkelly.com>
Date:   Wed Dec 2 20:44:31 2015 -0800

    Switch to pybuild
    
    This massively simplifies the debian/rules file. Yay!
---
 debian/changelog |  7 ++++++
 debian/rules     | 73 ++++----------------------------------------------------
 2 files changed, 12 insertions(+), 68 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 7ba7b6a..d27aa88 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+python-gmpy2 (2.0.7-2) unstable; urgency=medium
+
+  * Overhauled debian/rules to use pybuild. Things look a lot better now!
+    As a nice side-effect, Closes: #805958.
+
+ -- Martin Kelly <martin at martingkelly.com>  Wed, 02 Dec 2015 20:21:08 -0800
+
 python-gmpy2 (2.0.7-1) unstable; urgency=medium
 
   * New upstream release
diff --git a/debian/rules b/debian/rules
index 2d1f445..38298c1 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,77 +1,14 @@
 #!/usr/bin/make -f
 
-PY2VERS=$(shell pyversions -vr)
-PY3VERS=$(shell py3versions -vr)
-PYVERS=$(PY2VERS) $(PY3VERS)
-DPKG_EXPORT_BUILDFLAGS=1
-include /usr/share/dpkg/buildflags.mk
+export PYBUILD_NAME=gmpy2
 
 # Fix the build date for Sphinx manpages so we get reproducible builds.
 LAST_CHANGE=$(shell dpkg-parsechangelog -S Date)
 BUILD_DATE=$(shell LC_ALL=C date -u "+%B %d, %Y" -d "$(LAST_CHANGE)")
 
-clean:
-	dh_testdir
-	dh_testroot
-	rm -f *-stamp
-	rm -f build-*
-	rm -rf build
-	rm -rf docs/_build
-	find . -name *\.py[co] -exec rm {} \;
-	dh_clean
+%:
+	dh $@ --buildsystem pybuild --parallel --with python2,python3,sphinxdoc
 
-build: build-indep build-arch
-
-build-arch: $(PYVERS:%=build-python%)
-	touch $@
-
-build-python%:
-	dh_testdir
-	python$* setup.py build
-	touch $@
-
-build-indep:
+override_dh_auto_build:
+	dh_auto_build
 	make man -C $(CURDIR)/docs SPHINXOPTS="-D today=\"$(BUILD_DATE)\""
-	touch $@
-
-install: $(PYVERS:%=install-python%)
-
-install-python%: build
-	if echo "$*" | grep -q 3\..* ; then \
-		python$* setup.py install --install-layout=deb --root $(CURDIR)/debian/python3-gmpy2/; \
-	else \
-		python$* setup.py install --install-layout=deb --root $(CURDIR)/debian/python-gmpy2/; \
-	fi
-
-test: $(PYVERS:%=test-python%)
-
-test-python%: install
-	if echo "$*" | grep -q 3\..* ; then \
-		PYTHONPATH=$(CURDIR)/debian/python3-gmpy2/usr/lib/python3/dist-packages:$(PYTHONPATH) python$* test/runtests.py; \
-	else \
-		PYTHONPATH=$(CURDIR)/debian/python-gmpy2/usr/lib/python$*/dist-packages:$(PYTHONPATH) python$* test/runtests.py; \
-	fi
-
-binary-indep: build install test
-
-binary-arch: build install test
-	dh_testdir
-	dh_testroot
-	dh_installchangelogs 
-	dh_installdocs
-	dh_installman
-	dh_installexamples
-	dh_python2 -a
-	dh_python3 -a
-	dh_strip
-	dh_compress
-	dh_fixperms
-	dh_installdeb
-	dh_shlibdeps
-	dh_gencontrol
-	dh_md5sums
-	dh_builddeb
-
-binary: binary-indep binary-arch
-
-.PHONY: build clean binary-indep binary-arch binary test install

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



More information about the Python-modules-commits mailing list