Apply patch by Piotr Ożarowski <piotr@debian.org> to properly run test on all archite...
authorAndreas Tille <tille@debian.org>
Fri, 21 Feb 2014 22:13:17 +0000 (23:13 +0100)
committerAndreas Tille <tille@debian.org>
Fri, 21 Feb 2014 23:39:21 +0000 (00:39 +0100)
debian/changelog
debian/control
debian/python-pysam.install [deleted file]
debian/rules

index 728f5edf2ebafc111ea3be5989f3f04a1e56146e..68591d2de7c5191c4814b93f909dbef7b5c9b085 100644 (file)
@@ -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 <piotr@debian.org> for the patch)
+    Closes: #739631
+
+ -- Andreas Tille <tille@debian.org>  Thu, 20 Feb 2014 19:01:46 +0100
+
 python-pysam (0.7.5-1) unstable; urgency=low
 
   * Initial release (Closes: #738665)
index 8699486c0d6b18cf8f7d158e2d006660f5e62eaa..c9acaafd31563e4d461835492e5dbbb7f3a504e0 100644 (file)
@@ -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 (file)
index 13f83a7..0000000
+++ /dev/null
@@ -1 +0,0 @@
-/usr/lib/python2.*/*
index 50d4cadb981e9b6c74b1368b7e25e47d58b006ee..2263b14b0ae9cc26c03c3d51908d4a7fac3be3b7 100755 (executable)
@@ -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: