Revamp packaging of test data
authorAfif Elghraoui <afif@ghraoui.name>
Sat, 11 Jul 2015 20:57:10 +0000 (13:57 -0700)
committerAfif Elghraoui <afif@ghraoui.name>
Sat, 11 Jul 2015 20:57:10 +0000 (13:57 -0700)
The test code was packaged together with the test data; only the
data should be packaged separately. In addition, files in
autopkgtest were also packaged here for use the user.

debian/control
debian/python-pysam-data.install [new file with mode: 0644]
debian/python-pysam-data.lintian-overrides [new file with mode: 0644]
debian/python-pysam-tests.README.Debian [deleted file]
debian/python-pysam-tests.docs [deleted file]
debian/python-pysam-tests.install [deleted file]
debian/python-pysam-tests.lintian-overrides [deleted file]
debian/python-pysam.links [new file with mode: 0644]
debian/python3-pysam.links [new file with mode: 0644]
debian/rules

index aaa38a064e681c5bff355b52109db492a3dc7fb5..6962ec98eb2da7677e5aadb731df338fbc70f162 100644 (file)
@@ -46,7 +46,7 @@ Description: interface for the SAM/BAM sequence alignment and mapping format (Py
  .
  This package installs the module for Python 3.
 
-Package: python-pysam-tests
+Package: python-pysam-data
 Architecture: all
 Enhances: python-pysam
 Depends: ${misc:Depends},
diff --git a/debian/python-pysam-data.install b/debian/python-pysam-data.install
new file mode 100644 (file)
index 0000000..fd5c54b
--- /dev/null
@@ -0,0 +1,2 @@
+tests/pysam_data       usr/share/doc/python-pysam/data
+tests/tabix_data       usr/share/doc/python-pysam/data
diff --git a/debian/python-pysam-data.lintian-overrides b/debian/python-pysam-data.lintian-overrides
new file mode 100644 (file)
index 0000000..61c0327
--- /dev/null
@@ -0,0 +1,2 @@
+# Upstream-provided gzip file is independent of the build process
+package-contains-timestamped-gzip usr/share/doc/python-pysam/tests/pysam_data/ex1.sam.gz
diff --git a/debian/python-pysam-tests.README.Debian b/debian/python-pysam-tests.README.Debian
deleted file mode 100644 (file)
index 0c7ed43..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-Pysam for Debian
-================
-
-To verify whether your python-pysam and python3-pysam modules are working
-correctly you can run the test suite manually by running the scripts
-run-nose-tests and run-nose3-tests in this directory.
-
- -- Jorge Soares <j.s.soares@gmail.com>  Fri, 28 Nov 2014 14:29:40 +0100
diff --git a/debian/python-pysam-tests.docs b/debian/python-pysam-tests.docs
deleted file mode 100644 (file)
index 8e41b76..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-debian/tests/run-nose-tests
-debian/tests/run-nose3-tests
diff --git a/debian/python-pysam-tests.install b/debian/python-pysam-tests.install
deleted file mode 100644 (file)
index a99a578..0000000
+++ /dev/null
@@ -1 +0,0 @@
-tests  usr/share/doc/python-pysam
diff --git a/debian/python-pysam-tests.lintian-overrides b/debian/python-pysam-tests.lintian-overrides
deleted file mode 100644 (file)
index 61c0327..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-# Upstream-provided gzip file is independent of the build process
-package-contains-timestamped-gzip usr/share/doc/python-pysam/tests/pysam_data/ex1.sam.gz
diff --git a/debian/python-pysam.links b/debian/python-pysam.links
new file mode 100644 (file)
index 0000000..b5f7fce
--- /dev/null
@@ -0,0 +1,2 @@
+usr/share/doc/python-pysam/data/pysam_data     usr/lib/python2.7/dist-packages/pysam/tests/pysam_data
+usr/share/doc/python-pysam/data/tabix_data     usr/lib/python2.7/dist-packages/pysam/tests/tabix_data
diff --git a/debian/python3-pysam.links b/debian/python3-pysam.links
new file mode 100644 (file)
index 0000000..1aad73e
--- /dev/null
@@ -0,0 +1,2 @@
+usr/share/doc/python-pysam/data/pysam_data     usr/lib/python3/dist-packages/pysam/tests/pysam_data
+usr/share/doc/python-pysam/data/tabix_data     usr/lib/python3/dist-packages/pysam/tests/tabix_data
index 3abab89fc0e7515cba6bbca4c771b3a8bf250640..29f073a489bea7a0a7b91521c0e902ed795e11cc 100755 (executable)
@@ -2,7 +2,6 @@
 export PYBUILD_NAME=pysam
 
 DEBPKGNAME := $(shell dpkg-parsechangelog | awk '/^Source:/ {print $$2}')
-TESTPKG    := $(DEBPKGNAME)-tests
 
 HTSLIBDIR  := /usr/lib/$(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
 export HTSLIB_LIBRARY_DIR=$(HTSLIBDIR)
@@ -13,6 +12,10 @@ export HTSLIB_INCLUDE_DIR=/usr/include
 %:
        LC_ALL=C.UTF-8 dh $@ --with python2,python3 --buildsystem=pybuild
 
+override_dh_auto_build:
+       dh_auto_build
+       $(MAKE) -C tests/pysam_data
+
 override_dh_install:
        dh_install -Xtest.gtf.gz
 
@@ -20,5 +23,9 @@ override_dh_auto_test:
 #nothing to test until pysam is installed.
 #test package is provided for both Python versions
 
+override_dh_auto_clean:
+       dh_auto_clean
+       $(MAKE) -C tests/pysam_data clean
+
 get-orig-source:
        uscan --verbose --force-download --repack --compression xz