diff --git a/debian/changelog b/debian/changelog index c70e87c..dc17eb5 100644 --- a/debian/changelog +++ b/debian/changelog @@ -18,6 +18,7 @@ [ Thomas Goirand ] * New upstream release. * Fixed (build-)depends for this release. + * Using pkgos-dh_auto_{install,test}. -- Thomas Goirand Sun, 08 Oct 2017 23:07:03 +0200 diff --git a/debian/rules b/debian/rules index b58df15..07faa2e 100755 --- a/debian/rules +++ b/debian/rules @@ -1,25 +1,13 @@ #!/usr/bin/make -f - -PYTHONS:=$(shell pyversions -vr) -PYTHON3S:=$(shell py3versions -vr) UPSTREAM_GIT := https://github.com/openstack/castellan.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,sphinxdoc override_dh_auto_install: - set -e ; for pyvers in $(PYTHONS); do \ - python$$pyvers setup.py install --install-layout=deb \ - --root $(CURDIR)/debian/python-castellan; \ - done - set -e ; for pyvers in $(PYTHON3S); do \ - python$$pyvers setup.py install --install-layout=deb \ - --root $(CURDIR)/debian/python3-castellan; \ - done - rm -rf $(CURDIR)/debian/python*-castellan/usr/lib/python*/dist-packages/*.pth + pkgos-dh_auto_install mkdir -p $(CURDIR)/debian/python-castellan/etc/castellan PYTHONPATH=. oslo-config-generator --output-file $(CURDIR)/debian/python-castellan/etc/castellan/castellan.conf \ @@ -28,25 +16,12 @@ 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` ; \ - OS_TEST_PATH=castellan/tests/unit PYTHONPATH=$(CURDIR) PYTHON=python$$i testr-python$$PYMAJOR run --subunit 'castellan\.tests\.unit.*' | 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 'castellan\.tests\.unit.*' endif - override_dh_sphinxdoc: sphinx-build -b html doc/source debian/python-castellan-doc/usr/share/doc/python-castellan-doc/html dh_sphinxdoc -O--buildsystem=python_distutils - override_dh_clean: dh_clean -O--buildsystem=python_distutils