From 47de55cb7cf2db5dffe8ec85d2fffa2c13e87f71 Mon Sep 17 00:00:00 2001 From: Thomas Goirand Date: Wed, 13 Jul 2016 10:53:18 +0200 Subject: [PATCH] Using pkgos-dh_auto_{test,install} from openstack-pkg-tools >= 52~. --- debian/changelog | 1 + debian/control | 2 +- debian/rules | 29 ++--------------------------- 3 files changed, 4 insertions(+), 28 deletions(-) diff --git a/debian/changelog b/debian/changelog index bc3dff9..64f98d4 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,6 +2,7 @@ python-senlinclient (0.5.0-1) experimental; urgency=medium * New upstream release. * Fixed (build-)depends for this release. + * Using pkgos-dh_auto_{test,install} from openstack-pkg-tools >= 52~. -- Thomas Goirand Wed, 13 Jul 2016 10:46:38 +0200 diff --git a/debian/control b/debian/control index e49749b..a9132ad 100644 --- a/debian/control +++ b/debian/control @@ -7,7 +7,7 @@ Uploaders: Thomas Goirand , Corey Bryant , 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 7c75abe..38d5fb7 100755 --- a/debian/rules +++ b/debian/rules @@ -1,44 +1,19 @@ #!/usr/bin/make -f -PYTHONS:=$(shell pyversions -vr) -PYTHON3S:=$(shell py3versions -vr) - 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,sphinxdoc override_dh_auto_install: - set -e ; for pyvers in $(PYTHONS); do \ - python$$pyvers setup.py install --install-layout=deb \ - --root $(CURDIR)/debian/python-senlinclient; \ - done - set -e ; for pyvers in $(PYTHON3S); do \ - python$$pyvers setup.py install --install-layout=deb \ - --root $(CURDIR)/debian/python3-senlinclient; \ - done - rm -rf $(CURDIR)/debian/python*-senlinclient/usr/lib/python*/dist-packages/*.pth - mv $(CURDIR)/debian/python-senlinclient/usr/bin/senlin $(CURDIR)/debian/python-senlinclient/usr/bin/python2-senlin - mv $(CURDIR)/debian/python3-senlinclient/usr/bin/senlin $(CURDIR)/debian/python3-senlinclient/usr/bin/python3-senlin + pkgos-dh_auto_install override_dh_python3: dh_python3 --shebang=/usr/bin/python3 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 'senlinclient\.tests\.unit\.(?!(.*test_shell.ShellTest.test_do_add_profiler_args.*))' | 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 'senlinclient\.tests\.unit\.(?!(.*test_shell.ShellTest.test_do_add_profiler_args.*))' endif override_dh_sphinxdoc: