| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
PY3VERS = $(shell py3versions -vr) |
| 5 |
|
| 6 |
include /usr/share/openstack-pkg-tools/pkgos.make |
| 7 |
export OSLO_PACKAGE_VERSION=$(VERSION) |
| 8 |
UPSTREAM_GIT := https://github.com/testing-cabal/subunit.git |
| 9 |
|
| 10 |
%: |
| 11 |
dh $@ --with=python3 |
| 12 |
|
| 13 |
export INSTALLDIRS=vendor |
| 14 |
|
| 15 |
override_dh_auto_clean: |
| 16 |
rm -rf build python_subunit.egg-info |
| 17 |
rm -rf debian/tmp |
| 18 |
cp -rf debian/upstream-orig-files/* . |
| 19 |
rm -rf .libs \ |
| 20 |
c++/.dirstamp \ |
| 21 |
c/lib/.dirstamp \ |
| 22 |
c/tests/.dirstamp \ |
| 23 |
c/tests/.libs \ |
| 24 |
c++/.deps \ |
| 25 |
c/lib/.deps \ |
| 26 |
c/tests/.deps |
| 27 |
find . -iname '*.pyc' -delete |
| 28 |
find . -iname '*.o' -delete |
| 29 |
rm -f Makefile \ |
| 30 |
c++/SubunitTestProgressListener.lo \ |
| 31 |
c/lib/child.lo \ |
| 32 |
c/tests/test_child \ |
| 33 |
config.h \ |
| 34 |
config.log \ |
| 35 |
config.status \ |
| 36 |
libcppunit_subunit.la \ |
| 37 |
libcppunit_subunit.pc \ |
| 38 |
libsubunit.la \ |
| 39 |
libsubunit.pc \ |
| 40 |
libtool \ |
| 41 |
stamp-h1 \ |
| 42 |
c/tests/test_child.log \ |
| 43 |
c/tests/test_child.trs \ |
| 44 |
test-suite.log |
| 45 |
rm -f Makefile.in \ |
| 46 |
aclocal.m4 \ |
| 47 |
compile \ |
| 48 |
config.guess \ |
| 49 |
config.sub \ |
| 50 |
depcomp \ |
| 51 |
install-sh \ |
| 52 |
ltmain.sh \ |
| 53 |
missing \ |
| 54 |
py-compile |
| 55 |
rm -rf m4 ; mkdir m4 ; touch m4/.exists |
| 56 |
rm -rf c/lib/.libs c++/.libs |
| 57 |
find . -iname '*.pyc' -delete |
| 58 |
for i in $$(find . -type d -iname __pycache__) ; do rm -rf $$i ; done |
| 59 |
|
| 60 |
override_dh_auto_configure: |
| 61 |
dh_auto_configure -- --$(if $(filter nocheck,$(DEB_BUILD_OPTIONS)),dis,en)able-check |
| 62 |
|
| 63 |
override_dh_auto_test: |
| 64 |
ifeq (,$(findstring nocheck, $(DEB_BUILD_OPTIONS))) |
| 65 |
dh_auto_test || true |
| 66 |
for vers in $(PY3VERS); do \ |
| 67 |
SHELL_SHARE='./shell/share/' PYTHONPATH=./python${PYTHONPATH:+:$PYTHONPATH} python$$vers runtests.py || true; \ |
| 68 |
done |
| 69 |
endif |
| 70 |
|
| 71 |
override_dh_auto_install-arch: |
| 72 |
$(MAKE) install DESTDIR=$(CURDIR)/debian/tmp |
| 73 |
find debian/tmp/ -name "*.pyc" | xargs rm -f |
| 74 |
find debian/tmp/ -name "__pycache__" | xargs rm -rf |
| 75 |
find debian/tmp/ -name "*.pyo" | xargs rm -f |
| 76 |
|
| 77 |
|
| 78 |
override_dh_auto_install-indep: |
| 79 |
set -e ; set -x ; for vers in $(PY3VERS); do \ |
| 80 |
python$$vers setup.py install --install-layout=deb --root=$(CURDIR)/debian/tmp; \ |
| 81 |
done |
| 82 |
|
| 83 |
override_dh_install: |
| 84 |
dh_install |
| 85 |
dh_python3 --shebang=/usr/bin/python3 |