Codebase list python-osprofiler / 68f529c
Using pkgos-dh_auto_{install,test}. Thomas Goirand 6 years ago
2 changed file(s) with 4 addition(s) and 29 deletion(s). Raw diff Collapse all Expand all
2626 [ Thomas Goirand ]
2727 * New upstream release.
2828 * Fixed (build-)depends for this release.
29 * Using pkgos-dh_auto_{install,test}.
2930
3031 -- Thomas Goirand <zigo@debian.org> Tue, 03 Oct 2017 14:03:29 +0200
3132
33 BUILD_DATE = $(shell LC_ALL=C date -u "+%B %d, %Y" -d "$(LAST_CHANGE)")
44 SPHINXOPTS := -D html_last_updated_fmt="$(BUILD_DATE)"
55
6 PYTHONS:=$(shell pyversions -vr)
7 PYTHON3S:=$(shell py3versions -vr)
8
96 UPSTREAM_GIT := https://github.com/openstack/osprofiler.git
107 include /usr/share/openstack-pkg-tools/pkgos.make
11
12 export OSLO_PACKAGE_VERSION=$(VERSION)
138
149 %:
1510 dh $@ --buildsystem=python_distutils --with python2,python3,sphinxdoc
1611
17 override_dh_install:
18 set -e && for pyvers in $(PYTHONS); do \
19 python$$pyvers setup.py install --install-layout=deb \
20 --root $(CURDIR)/debian/python-osprofiler; \
21 done
22 set -e && for pyvers in $(PYTHON3S); do \
23 python$$pyvers setup.py install --install-layout=deb \
24 --root $(CURDIR)/debian/python3-osprofiler; \
25 done
26 mv $(CURDIR)/debian/python-osprofiler/usr/bin/osprofiler $(CURDIR)/debian/python-osprofiler/usr/bin/python2-osprofiler
27 mv $(CURDIR)/debian/python3-osprofiler/usr/bin/osprofiler $(CURDIR)/debian/python3-osprofiler/usr/bin/python3-osprofiler
28 rm -rf $(CURDIR)/debian/python*-osprofiler/usr/lib/python*/dist-packages/*.pth
12 override_dh_auto_install:
13 pkgos-dh_auto_install
2914
3015 override_dh_python3:
3116 dh_python3 --shebang=/usr/bin/python3
3217
3318 override_dh_auto_test:
3419 ifeq (,$(findstring nocheck, $(DEB_BUILD_OPTIONS)))
35 echo "===> Running tests"
36 set -ex ; for i in 2.7 $(PYTHON3S) ; do \
37 PYMAJOR=`echo $$i | cut -d'.' -f1` ; \
38 echo "===> Testing with python$$i (python$$PYMAJOR)" ; \
39 rm -rf .testrepository ; \
40 testr-python$$PYMAJOR init ; \
41 TEMP_REZ=`mktemp -t` ; \
42 PYTHONPATH=$(CURDIR) PYTHON=python$$i testr-python$$PYMAJOR run --subunit 'tests\.(?!.*OptsTestCase.test_entry_point.*)' | tee $$TEMP_REZ | subunit2pyunit ; \
43 cat $$TEMP_REZ | subunit-filter -s --no-passthrough | subunit-stats ; \
44 rm -f $$TEMP_REZ ; \
45 testr-python$$PYMAJOR slowest ; \
46 done
20 pkgos-dh_auto_test 'osprofiler\.tests\.(?!.*OptsTestCase.test_entry_point.*)'
4721 endif
4822
4923 override_dh_clean: