From f2f2dfa6c5213a1d96b273451b1f0a19f977b14d Mon Sep 17 00:00:00 2001 From: Thomas Goirand Date: Tue, 12 Jul 2016 12:32:29 +0000 Subject: [PATCH] Using pkgos-dh_auto_{test,install} from openstack-pkg-tools >= 52~. --- debian/changelog | 7 +++++-- debian/control | 2 +- debian/rules | 30 +++--------------------------- 3 files changed, 9 insertions(+), 30 deletions(-) diff --git a/debian/changelog b/debian/changelog index 9570b59..d553d06 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -python-ironic-lib (1.3.0-1) UNRELEASED; urgency=medium +python-ironic-lib (1.3.0-1) experimental; urgency=medium [ Ondřej Nový ] * Standards-Version is 3.9.8 now (no change) @@ -9,7 +9,10 @@ python-ironic-lib (1.3.0-1) UNRELEASED; urgency=medium * d/gbp.conf: Update branch to debian/newton. * d/control: Align (Build-)Depends with upstream. - -- Corey Bryant Tue, 24 May 2016 09:23:40 -0400 + [ Thomas Goirand ] + * Using pkgos-dh_auto_{test,install} from openstack-pkg-tools >= 52~. + + -- Thomas Goirand Tue, 12 Jul 2016 12:31:46 +0000 python-ironic-lib (1.1.0-2) unstable; urgency=medium diff --git a/debian/control b/debian/control index 3a4a262..3b4b873 100644 --- a/debian/control +++ b/debian/control @@ -5,7 +5,7 @@ Maintainer: PKG OpenStack Uploaders: Thomas Goirand , Build-Depends: debhelper (>= 9), dh-python, - openstack-pkg-tools, + openstack-pkg-tools (>= 52~), python-all, python-pbr (>= 1.8), python-setuptools, diff --git a/debian/rules b/debian/rules index 840d9a9..95ff7ef 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 := https://github.com/openstack/ironic-lib.git include /usr/share/openstack-pkg-tools/pkgos.make -export OSLO_PACKAGE_VERSION=$(shell dpkg-parsechangelog | grep Version: | cut -d' ' -f2 | sed -e 's/^[[:digit:]]*://' -e 's/[-].*//' -e 's/~/.0/' | head -n 1) - %: dh $@ --buildsystem=python_distutils --with python2,python3 -override_dh_install: - set -e ; for pyvers in $(PYTHONS); do \ - python$$pyvers setup.py install --install-layout=deb \ - --root $(CURDIR)/debian/python-ironic-lib; \ - done - set -e ; for pyvers in $(PYTHON3S); do \ - python$$pyvers setup.py install --install-layout=deb \ - --root $(CURDIR)/debian/python3-ironic-lib; \ - done - rm -rf $(CURDIR)/debian/python*-ironic-lib/usr/lib/python*/dist-packages/*.pth +override_dh_auto_install: + 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_clean: