Switch to pkgos-dh_auto_{test,install}.

This commit is contained in:
Thomas Goirand 2016-07-01 14:29:15 +00:00
parent 41b54dcdd7
commit 77240c4e0a
3 changed files with 10 additions and 29 deletions

8
debian/changelog vendored
View File

@ -1,8 +1,12 @@
python-oslo.context (2.5.0-1) UNRELEASED; urgency=medium
python-oslo.context (2.5.0-1) experimental; urgency=medium
[ David Della Vecchia ]
* New upstream release.
-- David Della Vecchia <ddv@canonical.com> Thu, 30 Jun 2016 10:46:08 -0400
[ Thomas Goirand ]
* Switch to pkgos-dh_auto_{test,install}.
-- Thomas Goirand <zigo@debian.org> Fri, 01 Jul 2016 14:27:49 +0000
python-oslo.context (2.4.0-1) experimental; urgency=medium

2
debian/control vendored
View File

@ -7,7 +7,7 @@ Uploaders: Thomas Goirand <zigo@debian.org>,
Corey Bryant <corey.bryant@canonical.com>,
Build-Depends: debhelper (>= 9~),
dh-python,
openstack-pkg-tools,
openstack-pkg-tools (>= 52~),
python-all,
python-pbr (>= 1.8),
python-setuptools,

29
debian/rules vendored
View File

@ -1,40 +1,17 @@
#!/usr/bin/make -f
PYTHONS:=$(shell pyversions -vr)
PYTHON3S:=$(shell py3versions -vr)
UPSTREAM_GIT := https://github.com/openstack/oslo.context.git
include /usr/share/openstack-pkg-tools/pkgos.make
export OSLO_PACKAGE_VERSION=$(VERSION)
%:
dh $@ --buildsystem=python_distutils --with=python2,python3,sphinxdoc
override_dh_install:
set -e && for pyvers in $(PYTHONS); do \
python$$pyvers setup.py install --install-layout=deb \
--root $(CURDIR)/debian/python-oslo.context; \
done
set -e && for pyvers in $(PYTHON3S); do \
python$$pyvers setup.py install --install-layout=deb \
--root $(CURDIR)/debian/python3-oslo.context; \
done
rm -f $(CURDIR)/debian/python*-oslo-context/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 $(PYTHONS) $(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` && \
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_sphinxdoc: