diff --git a/debian/changelog b/debian/changelog index 0c5ed5d..70c36b6 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,6 +2,7 @@ * New upstream release. * Removed Python 2 support. + * Run unit tests from installed Python package. -- Thomas Goirand Tue, 26 Mar 2019 17:50:55 +0100 diff --git a/debian/python3-castellan.install b/debian/python3-castellan.install new file mode 100644 index 0000000..d474166 --- /dev/null +++ b/debian/python3-castellan.install @@ -0,0 +1,2 @@ +/etc +/usr diff --git a/debian/rules b/debian/rules index 87d79b0..564f7bf 100755 --- a/debian/rules +++ b/debian/rules @@ -13,17 +13,21 @@ echo "Do nothing..." override_dh_auto_install: - pkgos-dh_auto_install --no-py2 + for i in $(PYTHON3S) ; do \ + python3 setup.py install -f --install-layout=deb --root=$(CURDIR)/debian/tmp ; \ + done - mkdir -p $(CURDIR)/debian/python-castellan/etc/castellan - PYTHONPATH=. oslo-config-generator --output-file $(CURDIR)/debian/python-castellan/etc/castellan/castellan.conf \ + mkdir -p $(CURDIR)/debian/tmp/etc/castellan + PYTHONPATH=. oslo-config-generator --output-file $(CURDIR)/debian/tmp/etc/castellan/castellan.conf \ --wrap-width 140 \ --namespace castellan.config +ifeq (,$(findstring nocheck, $(DEB_BUILD_OPTIONS))) + PYTHONPATH=$(CURDIR)/debian/tmp/usr/lib/python3/dist-packages pkgos-dh_auto_test --no-py2 'castellan\.tests\.unit.*' +endif + override_dh_auto_test: -ifeq (,$(findstring nocheck, $(DEB_BUILD_OPTIONS))) - pkgos-dh_auto_test --no-py2 'castellan\.tests\.unit.*' -endif + echo "Do nothing..." override_dh_sphinxdoc: ifeq (,$(findstring nodoc, $(DEB_BUILD_OPTIONS)))