From dafe61e77f05edeb8bf5c73601c4ec12c44c98b1 Mon Sep 17 00:00:00 2001 From: Andreas Tille Date: Fri, 21 Feb 2014 23:13:17 +0100 Subject: [PATCH] =?utf8?q?Apply=20patch=20by=20Piotr=20O=C5=BCarowski=20=20to=20properly=20run=20test=20on=20all=20archi?= =?utf8?q?tectures?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- debian/changelog | 8 ++++++++ debian/control | 1 + debian/python-pysam.install | 1 - debian/rules | 19 +++++-------------- 4 files changed, 14 insertions(+), 15 deletions(-) delete mode 100644 debian/python-pysam.install diff --git a/debian/changelog b/debian/changelog index 728f5ed..68591d2 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +python-pysam (0.7.5-2) UNRELEASED; urgency=medium + + * debian/rules: Set PYTHONPATH correctly using dh_python + (thanks to Piotr Ożarowski for the patch) + Closes: #739631 + + -- Andreas Tille Thu, 20 Feb 2014 19:01:46 +0100 + python-pysam (0.7.5-1) unstable; urgency=low * Initial release (Closes: #738665) 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/python-pysam.install b/debian/python-pysam.install deleted file mode 100644 index 13f83a7..0000000 --- a/debian/python-pysam.install +++ /dev/null @@ -1 +0,0 @@ -/usr/lib/python2.*/* diff --git a/debian/rules b/debian/rules index 50d4cad..2263b14 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,13 +26,11 @@ override_dh_auto_build: debian/savefiles dh_auto_build override_dh_auto_test: - dh_auto_test - chmod a+x tests/pysam_test_offline.py + dh_auto_test # default tests 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 + PYBUILD_SYSTEM=custom \ + PYBUILD_TEST_ARGS="cd tests && PYTHONPATH={build_dir} {interpreter} ./pysam_test_offline.py" \ + dh_auto_test --buildsystem=pybuild endif override_dh_install-indep: -- 2.30.2