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