From 6ec8aab49e14011687ef1b84b22db675b78ec1d5 Mon Sep 17 00:00:00 2001 From: Afif Elghraoui Date: Sat, 11 Jul 2015 13:57:10 -0700 Subject: [PATCH] Revamp packaging of test data 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 | 2 +- debian/python-pysam-data.install | 2 ++ ...ian-overrides => python-pysam-data.lintian-overrides} | 0 debian/python-pysam-tests.README.Debian | 8 -------- debian/python-pysam-tests.docs | 2 -- debian/python-pysam-tests.install | 1 - debian/python-pysam.links | 2 ++ debian/python3-pysam.links | 2 ++ debian/rules | 9 ++++++++- 9 files changed, 15 insertions(+), 13 deletions(-) create mode 100644 debian/python-pysam-data.install rename debian/{python-pysam-tests.lintian-overrides => python-pysam-data.lintian-overrides} (100%) delete mode 100644 debian/python-pysam-tests.README.Debian delete mode 100644 debian/python-pysam-tests.docs delete mode 100644 debian/python-pysam-tests.install create mode 100644 debian/python-pysam.links create mode 100644 debian/python3-pysam.links diff --git a/debian/control b/debian/control index aaa38a0..6962ec9 100644 --- a/debian/control +++ b/debian/control @@ -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 index 0000000..fd5c54b --- /dev/null +++ b/debian/python-pysam-data.install @@ -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-tests.lintian-overrides b/debian/python-pysam-data.lintian-overrides similarity index 100% rename from debian/python-pysam-tests.lintian-overrides rename to debian/python-pysam-data.lintian-overrides diff --git a/debian/python-pysam-tests.README.Debian b/debian/python-pysam-tests.README.Debian deleted file mode 100644 index 0c7ed43..0000000 --- a/debian/python-pysam-tests.README.Debian +++ /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 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 index 8e41b76..0000000 --- a/debian/python-pysam-tests.docs +++ /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 index a99a578..0000000 --- a/debian/python-pysam-tests.install +++ /dev/null @@ -1 +0,0 @@ -tests usr/share/doc/python-pysam diff --git a/debian/python-pysam.links b/debian/python-pysam.links new file mode 100644 index 0000000..b5f7fce --- /dev/null +++ b/debian/python-pysam.links @@ -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 index 0000000..1aad73e --- /dev/null +++ b/debian/python3-pysam.links @@ -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 diff --git a/debian/rules b/debian/rules index 3abab89..29f073a 100755 --- a/debian/rules +++ b/debian/rules @@ -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 -- 2.30.2