[med-svn] [pysam] 02/02: Enable proper cleaning by preserving original Cython created files.
Andreas Tille
tille at debian.org
Tue Feb 11 10:32:21 UTC 2014
This is an automated email from the git hooks/post-receive script.
tille pushed a commit to branch master
in repository pysam.
commit df4dda0d7da70d61cc511947c85d331ce77bc451
Author: Andreas Tille <tille at debian.org>
Date: Tue Feb 11 11:36:54 2014 +0100
Enable proper cleaning by preserving original Cython created files.
---
debian/python-pysam.install | 1 +
debian/rules | 21 +++++++++++++++++----
2 files changed, 18 insertions(+), 4 deletions(-)
diff --git a/debian/python-pysam.install b/debian/python-pysam.install
new file mode 100644
index 0000000..13f83a7
--- /dev/null
+++ b/debian/python-pysam.install
@@ -0,0 +1 @@
+/usr/lib/python2.*/*
diff --git a/debian/rules b/debian/rules
index a1bc875..3c444f4 100755
--- a/debian/rules
+++ b/debian/rules
@@ -5,6 +5,23 @@ pybuilddir := $(CURDIR)/build/lib.$(shell dpkg-architecture -qDEB_BUILD_ARCH_OS)
%:
dh $@ --with python2
+# Cython is recreating some c-files. To enable building twice in a row these
+# will be saved in advance and restored afterwards
+debian/savefiles:
+ mkdir -p debian/savefiles
+ cp -a `grep -l "Generated by Cython" pysam/*.c` debian/savefiles
+
+override_dh_clean:
+ dh_clean
+ # restore cython generated files
+ if [ -d debian/savefiles ] ; then \
+ mv debian/savefiles/* pysam ; \
+ rm -rf debian/savefiles ; \
+ fi
+
+override_dh_auto_build: debian/savefiles
+ dh_auto_build
+
override_dh_auto_test:
dh_auto_test
chmod a+x tests/pysam_test_offline.py
@@ -15,10 +32,6 @@ ifeq (,$(filter nocheck,$(DEB_BUILD_OPTIONS)))
done
endif
-override_dh_install:
- echo '/usr/lib/python2.*/*' >> debian/python-pysam.install
- dh_install
-
override_dh_auto_clean:
dh_auto_clean
cd tests; make clean
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-med/pysam.git
More information about the debian-med-commit
mailing list