[med-svn] [pbbarcode] 03/03: Fix encoding of module path to consider multiarch
Afif Elghraoui
afif-guest at moszumanska.debian.org
Fri Dec 18 08:36:46 UTC 2015
This is an automated email from the git hooks/post-receive script.
afif-guest pushed a commit to branch master
in repository pbbarcode.
commit 2c0afe2f96cd7f1aea17e555ea21cbba28af40af
Author: Afif Elghraoui <afif at ghraoui.name>
Date: Fri Dec 18 00:35:50 2015 -0800
Fix encoding of module path to consider multiarch
The extension module can not be found otherwise because
the program hard-codes the module path without consideration
of multi-arch.
---
debian/patches/module-multiarch-path.patch | 21 +++++++++++++++++++++
debian/patches/series | 1 +
2 files changed, 22 insertions(+)
diff --git a/debian/patches/module-multiarch-path.patch b/debian/patches/module-multiarch-path.patch
new file mode 100644
index 0000000..212f4a5
--- /dev/null
+++ b/debian/patches/module-multiarch-path.patch
@@ -0,0 +1,21 @@
+Description: Fix hard-coded module path search for compiled extension
+Author: Afif Elghraoui <afif at ghraoui.name>
+Forwarded: not-needed
+Last-Update: 2015-12-18
+--- pbbarcode.orig/src/python/pbbarcode/SWaligner.py
++++ pbbarcode/src/python/pbbarcode/SWaligner.py
+@@ -30,11 +30,13 @@
+ import os
+ import numpy
+ import pkg_resources
++import sysconfig
+
+ class SWaligner(object):
+ def __init__(self):
++ multiarch = sysconfig.get_config_var('MULTIARCH')
+ # setup.py should put sw.so in the following path.
+- self.SW_DLL_PATH = os.path.dirname(os.path.abspath(__file__)) + os.path.sep + "sw.so"
++ self.SW_DLL_PATH = os.path.dirname(os.path.abspath(__file__)) + os.path.sep + "sw." + multiarch + ".so"
+ self._dll = CDLL(self.SW_DLL_PATH)
+ self.dpMat = self._dll.allocate_dp_mat()
+
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..f84d456
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+module-multiarch-path.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-med/pbbarcode.git
More information about the debian-med-commit
mailing list