[med-svn] [python-pysam] 02/08: Move test directory cleaning commands to a separate recipe

Afif Elghraoui afif-guest at moszumanska.debian.org
Fri Jul 24 08:07:37 UTC 2015


This is an automated email from the git hooks/post-receive script.

afif-guest pushed a commit to branch master
in repository python-pysam.

commit 1bb6fcc6c7927d3c67c74d64350d96c5af57ea73
Author: Afif Elghraoui <afif at ghraoui.name>
Date:   Fri Jul 24 00:20:38 2015 -0700

    Move test directory cleaning commands to a separate recipe
    
    This allows us to be require a clean test directory before the
    installation step. We don't want to package all the temporary
    files that come with the tests being built.
---
 debian/rules | 38 +++++++++++++++++++++-----------------
 1 file changed, 21 insertions(+), 17 deletions(-)

diff --git a/debian/rules b/debian/rules
index 23ef750..0a7ac11 100755
--- a/debian/rules
+++ b/debian/rules
@@ -16,26 +16,11 @@ export PYBUILD_TEST_ARGS={dir}/tests
 %:
 	LC_ALL=C.UTF-8 dh $@ --with python2,python3 --buildsystem=pybuild
 
-override_dh_install:
+override_dh_install: clean-tests
 	dh_install -Xtest.gtf.gz
 
-override_dh_auto_clean:
+override_dh_auto_clean: clean-tests
 	dh_auto_clean
-	$(MAKE) -C tests/pysam_data clean
-	find . -name "*.pyc" -delete
-	find . -name "*.pyxbldc" -delete
-	find . -name "tmp_*" -delete
-	find . -name "*.bai*" -delete
-	find . -name "*.cram*" -delete
-	find . -name "*.bam" -delete
-	rm -rf	tests/pysam_test_work \
-		tests/example_htslib.gtf.gz.tbi \
-		tests/log.txt \
-		tests/test.bam \
-		tests/_compile_test.c \
-		tests/pysam_ex2.sam \
-		pysam/calignmentfile.c \
-		pysam/cbcf.c
 
 override_dh_auto_test:
 	# Tests are stumbling upon missing ex1.bam file ...
@@ -59,3 +44,22 @@ override_dh_auto_test:
 
 get-orig-source:
 	uscan --verbose --force-download --repack --compression xz
+
+clean-tests:
+	$(MAKE) -C tests/pysam_data clean
+	find . -name "*.pyc" -delete
+	find . -name "*.pyxbldc" -delete
+	find . -name "tmp_*" -delete
+	find . -name "*.bai*" -delete
+	find . -name "*.cram*" -delete
+	find . -name "*.bam" -delete
+	rm -rf	tests/pysam_test_work \
+		tests/example_htslib.gtf.gz.tbi \
+		tests/log.txt \
+		tests/test.bam \
+		tests/_compile_test.c \
+		tests/pysam_ex2.sam \
+		pysam/calignmentfile.c \
+		pysam/cbcf.c
+
+.PHONY: clean-tests

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-med/python-pysam.git



More information about the debian-med-commit mailing list