[Reproducible-builds] [dh-python] 141/183: Interpreter: add library_file property

Jérémy Bobbio lunar at moszumanska.debian.org
Fri Sep 19 15:30:31 UTC 2014


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

lunar pushed a commit to branch pu/reproducible_builds
in repository dh-python.

commit a9091099ccdc979564a52ecd743d6739c3c93925
Author: Piotr Ożarowski <piotr at debian.org>
Date:   Thu Oct 17 22:20:19 2013 +0200

    Interpreter: add library_file property
---
 dhpython/interpreter.py | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)

diff --git a/dhpython/interpreter.py b/dhpython/interpreter.py
index 7967512..22ec1c8 100644
--- a/dhpython/interpreter.py
+++ b/dhpython/interpreter.py
@@ -399,6 +399,19 @@ class Interpreter:
                 result += 'mu'
         return result
 
+    @property
+    def library_file(self):
+        """Return libfoo.so file path."""
+        if self.impl == 'pypy':
+            return ''
+        libpl, ldlibrary = self._get_config()[3:5]
+        if ldlibrary.endswith('.a'):
+            # python3.1-dbg, python3.2, python3.2-dbg returned static lib
+            ldlibrary = ldlibrary.replace('.a', '.so')
+        if libpl and ldlibrary:
+            return join(libpl, ldlibrary)
+        raise Exception('cannot find library file for {}'.format(self))
+
     def check_extname(self, fname, version=None):
         """Return extension file name if file can be renamed."""
 
@@ -485,7 +498,7 @@ class Interpreter:
             cmd = 'from distutils import sysconfig as s;'
         cmd += 'print("__SEP__".join(i or "" ' \
                'for i in s.get_config_vars('\
-               '"SOABI", "MULTIARCH", "INCLUDEPY")))'
+               '"SOABI", "MULTIARCH", "INCLUDEPY", "LIBPL", "LDLIBRARY")))'
         conf_vars = self._execute(cmd, version).split('__SEP__')
         try:
             conf_vars[1] = os.environ['DEB_HOST_MULTIARCH']

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



More information about the Reproducible-builds mailing list