[med-svn] [khmer] 01/01: Remove the 'module' infix from the CPython extension

Michael Crusoe misterc-guest at moszumanska.debian.org
Thu Feb 12 11:07:45 UTC 2015


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

misterc-guest pushed a commit to branch master
in repository khmer.

commit cdd3ca1806d23ea004e6cebfda0c7dff10fb7c99
Author: Michael R. Crusoe <mcrusoe at msu.edu>
Date:   Thu Feb 12 05:24:31 2015 -0500

    Remove the 'module' infix from the CPython extension
---
 debian/changelog   |  8 ++++++++
 debian/khmer.links |  1 -
 debian/rules       | 15 ++++++++++++++-
 3 files changed, 22 insertions(+), 2 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 1ba7610..3609e05 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+khmer (1.3+dfsg-2) UNRELEASED; urgency=low
+
+  * Remove 'module' infix from CPython extension which allows dh_python2 to
+    add the multiarch triplet infix without affecting module loading. Removed
+    symlink workaround now that it is no longer needed.
+
+ -- Michael R. Crusoe <mcrusoe at msu.edu>  Thu, 12 Feb 2015 06:02:36 -0500
+
 khmer (1.3+dfsg-1) unstable; urgency=medium
 
   * Initial upload (Closes: #777688)
diff --git a/debian/khmer.links b/debian/khmer.links
deleted file mode 100644
index 7b774a8..0000000
--- a/debian/khmer.links
+++ /dev/null
@@ -1 +0,0 @@
-usr/lib/python2.7/dist-packages/khmer/_khmermodule.x86_64-linux-gnu.so usr/lib/python2.7/dist-packages/khmer/_khmermodule.so
diff --git a/debian/rules b/debian/rules
index b64e2b4..9be7504 100755
--- a/debian/rules
+++ b/debian/rules
@@ -4,6 +4,16 @@ export PYBUILD_NAME=khmer
 export PYBUILD_SYSTEM=distutils
 export PYBUILD_INSTALL_ARGS='--install-scripts=/usr/lib/khmer/bin'
 
+# dh_python2 renames compiled extensions to include a multiarch triplet
+# ex: _khmermodule.so -> _khmermodule.x86_64-linux-gnu.so
+# While Python can handle the multiarch triplet it can't do so in combination
+# with the 'module' infix. So we remove the 'module' infix before dh_python2
+# runs
+# See https://lists.debian.org/debian-python/2015/02/msg00047.html
+export PYBUILD_AFTER_INSTALL := \
+	mv {destdir}{install_dir}/khmer/_khmermodule.so \
+		{destdir}{install_dir}/khmer/_khmer.so
+
 %:
 	dh $@ --with python2,sphinxdoc --buildsystem=pybuild --parallel
 
@@ -16,7 +26,10 @@ override_dh_auto_build:
 
 override_dh_auto_test:
 	PYBUILD_SYSTEM=custom \
-	PYBUILD_TEST_ARGS="cd {build_dir}; ln -s {build_dir}/../../../scripts khmer/; PYTHONPATH={build_dir} {interpreter} -m nose --attr '!known_failing,!jenkins'; rm khmer/scripts" dh_auto_test
+	  PYBUILD_TEST_ARGS="cd {build_dir}; \
+	    ln -s {build_dir}/../../../scripts khmer/; PYTHONPATH={build_dir} \
+	    {interpreter} -m nose --attr '!known_failing,!jenkins'; \
+	    rm khmer/scripts" dh_auto_test
 
 override_dh_auto_clean:
 	dh_auto_clean

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



More information about the debian-med-commit mailing list