Package list python-castellan / debian/0.12.0-1
Using pkgos-dh_auto_{install,test}. Thomas Goirand 4 years ago
2 changed file(s) with 3 addition(s) and 27 deletion(s). Raw diff Collapse all Expand all
1717 [ Thomas Goirand ]
1818 * New upstream release.
1919 * Fixed (build-)depends for this release.
20 * Using pkgos-dh_auto_{install,test}.
2021
2122 -- Thomas Goirand <zigo@debian.org> Sun, 08 Oct 2017 23:07:03 +0200
2223
00 #!/usr/bin/make -f
1
2 PYTHONS:=$(shell pyversions -vr)
3 PYTHON3S:=$(shell py3versions -vr)
41
52 UPSTREAM_GIT := https://github.com/openstack/castellan.git
63 include /usr/share/openstack-pkg-tools/pkgos.make
7 export OSLO_PACKAGE_VERSION=$(shell dpkg-parsechangelog | grep Version: | cut -d' ' -f2 | sed -e 's/^[[:digit:]]*://' -e 's/[-].*//' -e 's/~/.0/' | head -n 1)
84
95 %:
106 dh $@ --buildsystem=python_distutils --with python2,python3,sphinxdoc
117
128 override_dh_auto_install:
13 set -e ; for pyvers in $(PYTHONS); do \
14 python$$pyvers setup.py install --install-layout=deb \
15 --root $(CURDIR)/debian/python-castellan; \
16 done
17 set -e ; for pyvers in $(PYTHON3S); do \
18 python$$pyvers setup.py install --install-layout=deb \
19 --root $(CURDIR)/debian/python3-castellan; \
20 done
21 rm -rf $(CURDIR)/debian/python*-castellan/usr/lib/python*/dist-packages/*.pth
9 pkgos-dh_auto_install
2210
2311 mkdir -p $(CURDIR)/debian/python-castellan/etc/castellan
2412 PYTHONPATH=. oslo-config-generator --output-file $(CURDIR)/debian/python-castellan/etc/castellan/castellan.conf \
2715
2816 override_dh_auto_test:
2917 ifeq (,$(findstring nocheck, $(DEB_BUILD_OPTIONS)))
30 @echo "===> Running tests"
31 set -e ; set -x ; for i in 2.7 $(PYTHON3S) ; do \
32 PYMAJOR=`echo $$i | cut -d'.' -f1` ; \
33 echo "===> Testing with python$$i (python$$PYMAJOR)" ; \
34 rm -rf .testrepository ; \
35 testr-python$$PYMAJOR init ; \
36 TEMP_REZ=`mktemp -t` ; \
37 OS_TEST_PATH=castellan/tests/unit PYTHONPATH=$(CURDIR) PYTHON=python$$i testr-python$$PYMAJOR run --subunit 'castellan\.tests\.unit.*' | tee $$TEMP_REZ | subunit2pyunit ; \
38 cat $$TEMP_REZ | subunit-filter -s --no-passthrough | subunit-stats ; \
39 rm -f $$TEMP_REZ ; \
40 testr-python$$PYMAJOR slowest ; \
41 done
18 pkgos-dh_auto_test 'castellan\.tests\.unit.*'
4219 endif
43
4420
4521 override_dh_sphinxdoc:
4622 sphinx-build -b html doc/source debian/python-castellan-doc/usr/share/doc/python-castellan-doc/html
4723 dh_sphinxdoc -O--buildsystem=python_distutils
48
4924
5025 override_dh_clean:
5126 dh_clean -O--buildsystem=python_distutils