/me continues promoting pybuild: -- Piotr Ożarowski Debian GNU/Linux Developer www.ozarowski.pl www.griffith.cc www.debian.org GPG Fingerprint: 1D2F A898 58DA AF62 1786 2DF7 AEF6 F1A2 A745 7645
diff --git a/debian/control b/debian/control index 8699486..c9acaaf 100644 --- a/debian/control +++ b/debian/control @@ -6,6 +6,7 @@ Section: python XS-Testsuite: autopkgtest Priority: optional Build-Depends: debhelper (>= 9), + dh-python, python-all-dev, python-setuptools, cython, diff --git a/debian/rules b/debian/rules index 50d4cad..aaf270f 100755 --- a/debian/rules +++ b/debian/rules @@ -1,19 +1,12 @@ #!/usr/bin/make -f -# Hint: -# https://wiki.debian.org/Python/LibraryStyleGuide -# suggests: export PYBUILD_NAME=pysam -# which probably does not harm but due to the fact that there is -# some additional binary package a debian/python-pysam.install -# file is definitely needed. DEBPKGNAME := $(shell dpkg-parsechangelog | awk '/^Source:/ {print $$2}') TESTPKG := $(DEBPKGNAME)-tests -pybuilddir := $(CURDIR)/build/lib.$(shell dpkg-architecture -qDEB_BUILD_ARCH_OS)-$(shell dpkg-architecture -qDEB_BUILD_GNU_CPU) %: - dh $@ --with python2 + dh $@ --with python2 --buildsystem=pybuild # Cython is recreating some c-files. To enable building twice in a row these # will be saved in advance and restored afterwards @@ -33,14 +26,10 @@ override_dh_auto_build: debian/savefiles dh_auto_build override_dh_auto_test: - dh_auto_test - chmod a+x tests/pysam_test_offline.py -ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS))) - set -e -x;\ - for pyv in `pyversions -dv` ; do \ - cd tests && env PYTHONPATH=$(pybuilddir)-$${pyv} ./pysam_test_offline.py ; \ - done -endif + dh_auto_test # default tests + PYBUILD_SYSTEM=custom \ + PYBUILD_TEST_ARGS="cd tests && PYTHONPATH={build_dir} {interpreter} ./pysam_test_offline.py" \ + dh_auto_test --buildsystem=pybuild override_dh_install-indep: dh_install -p $(TESTPKG)