[Python-modules-commits] [pysvn] 01/12: Patch-Name: fix-multiple-arch-support.patch

Josué Ortega josue at moszumanska.debian.org
Mon Oct 10 04:13:56 UTC 2016


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

josue pushed a commit to branch master
in repository pysvn.

commit 308ecf97edc2b2227656ff0967332e3bea7dc573
Author: Josue Ortega <josue at debian.org>
Date:   Sun Oct 9 21:16:25 2016 -0600

    Patch-Name: fix-multiple-arch-support.patch
    
    Fixes issue building the package on archs that are not amd64
---
 Source/setup_configure.py | 34 ++++++++++++++++++++++++++++++++--
 1 file changed, 32 insertions(+), 2 deletions(-)

diff --git a/Source/setup_configure.py b/Source/setup_configure.py
index 27aaf7c..f99f64f 100644
--- a/Source/setup_configure.py
+++ b/Source/setup_configure.py
@@ -14,6 +14,7 @@
 #
 import sys
 import os
+import subprocess
 import distutils
 import distutils.sysconfig
 import distutils.util
@@ -21,6 +22,25 @@ import distutils.util
 import xml.dom.minidom
 import xml.sax
 
+def get_debian_lib_directory():
+    debian_lib_path = "/usr/lib/ %(arch_name)s"
+    _process = subprocess.Popen(["dpkg-architecture", "-qDEB_HOST_MULTIARCH"],
+                               stdout=subprocess.PIPE)
+    _stdout, _stderr = _process.communicate()
+
+    if _stderr is not None:
+        return None
+
+    _arch = _stdout.replace("\n", "")
+    _debian_lib_path = debian_lib_path % {
+        "arch_name" : _arch
+    }
+
+    print('Debian lib directory %s\n', _debian_lib_path)
+
+    return _debian_lib_path
+
+
 class SetupError(Exception):
     pass
 
@@ -1184,6 +1204,8 @@ class UnixCompilerGCC(CompilerGCC):
     def __init__( self, setup ):
         CompilerGCC.__init__( self, setup )
 
+        _debian_arch = get_debian_lib_directory()
+
         self._find_paths_pycxx_dir = [
                         distutils.sysconfig.get_python_inc(), # typical Linux
                         '/usr/include'
@@ -1210,8 +1232,13 @@ class UnixCompilerGCC(CompilerGCC):
                         '/usr/local/lib64',                     # typical 64bit Linux
                         '/usr/local/lib',                       # typical *BSD
                         '/usr/pkg/lib',                         # netbsd
-                        '/usr/lib/x86_64-linux-gnu',            # debian/unbuntu
+                        # '/usr/lib/x86_64-linux-gnu',          # debian/unbuntu
                         ]
+
+        if _debian_arch is not None \
+           and _debian_arch not in self._find_paths_svn_lib:
+            self._find_paths_svn_lib.append(_debian_arch)
+
         self._find_paths_apr_inc = [
                         '/usr/include/apr-1',                   # typical Linux
                         '/usr/include/apr-1.0',                 # typical Linux
@@ -1230,8 +1257,11 @@ class UnixCompilerGCC(CompilerGCC):
                         '/usr/local/lib',                       # typical *BSD
                         '/usr/local/apr/lib',                   # Mac OS X www.metissian.com
                         '/usr/pkg/lib',                         # netbsd
-                        '/usr/lib/x86_64-linux-gnu',            # debian/unbuntu
+                        # '/usr/lib/x86_64-linux-gnu',          # debian/unbuntu
                         ]
+        if _debian_arch is not None \
+           and _debian_arch not in self._find_paths_apr_lib:
+            self._find_paths_apr_lib.append(_debian_arch)
 
         self._completeInit()
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/pysvn.git



More information about the Python-modules-commits mailing list