[Python-modules-commits] [python-gear] 02/02: Using pkgos-dh_auto_{install, test}.

Thomas Goirand zigo at moszumanska.debian.org
Sun Nov 5 20:49:36 UTC 2017


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

zigo pushed a commit to branch master
in repository python-gear.

commit 015f9a7e236fd8319de8fcff8b56800fe1d770b3
Author: Thomas Goirand <zigo at debian.org>
Date:   Sun Nov 5 20:45:07 2017 +0000

    Using pkgos-dh_auto_{install,test}.
---
 debian/changelog |  1 +
 debian/rules     | 28 ++--------------------------
 2 files changed, 3 insertions(+), 26 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 6363d36..e5c9975 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -2,6 +2,7 @@ python-gear (0.5.8-4) unstable; urgency=medium
 
   * Fixed shebang to python3 instead of python3.x.
   * Ran wrap-and-sort -bast.
+  * Using pkgos-dh_auto_{install,test}.
 
  -- Thomas Goirand <zigo at debian.org>  Sun, 05 Nov 2017 20:43:07 +0000
 
diff --git a/debian/rules b/debian/rules
index b740539..45fa610 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,41 +1,17 @@
 #!/usr/bin/make -f
 
-PYTHONS:=$(shell pyversions -vr)
-PYTHON3S:=$(shell py3versions -vr)
-
 UPSTREAM_GIT = git://github.com/openstack-infra/gear.git
 include /usr/share/openstack-pkg-tools/pkgos.make
-export OSLO_PACKAGE_VERSION=$(VERSION)
 
 %:
 	dh $@ --buildsystem=python_distutils --with python2,python3
 
 override_dh_auto_install:
-	set -e ; for pyvers in $(PYTHONS); do \
-		python$$pyvers setup.py install --install-layout=deb \
-			--root $(CURDIR)/debian/python-gear; \
-	done
-	set -e ; for pyvers in $(PYTHON3S); do \
-		python$$pyvers setup.py install --install-layout=deb \
-			--root $(CURDIR)/debian/python3-gear; \
-	done
-	mv $(CURDIR)/debian/python-gear/usr/bin/geard $(CURDIR)/debian/python-gear/usr/bin/python2-geard
-	mv $(CURDIR)/debian/python3-gear/usr/bin/geard $(CURDIR)/debian/python3-gear/usr/bin/python3-geard
+	pkgos-dh_auto_install
 
 override_dh_auto_test:
 ifeq (,$(findstring nocheck, $(DEB_BUILD_OPTIONS)))
-	@echo "===> Running tests"
-	set -e ; set -x ; for i in 2.7 $(PYTHON3S) ; do \
-		PYMAJOR=`echo $$i | cut -d'.' -f1` ; \
-		echo "===> Testing with python$$i (python$$PYMAJOR)" ; \
-		rm -rf .testrepository ; \
-		testr-python$$PYMAJOR init ; \
-		TEMP_REZ=`mktemp -t` ; \
-		PYTHONPATH=$(CURDIR) PYTHON=python$$i testr-python$$PYMAJOR run --subunit | tee $$TEMP_REZ | subunit2pyunit ; \
-		cat $$TEMP_REZ | subunit-filter -s --no-passthrough | subunit-stats ; \
-		rm -f $$TEMP_REZ ; \
-		testr-python$$PYMAJOR slowest ; \
-	done
+	pkgos-dh_auto_test
 endif
 
 override_dh_python3:

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



More information about the Python-modules-commits mailing list