[Python-modules-commits] [pyudev] 03/10: Hardcode the libudev SONAME that the package depends on.

Felix Geyer fgeyer at moszumanska.debian.org
Fri Sep 9 21:44:45 UTC 2016


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

fgeyer pushed a commit to branch master
in repository pyudev.

commit fbaba6ec50aa882f960eea324a6d842afe38b8bd
Author: SVN-Git Migration <python-modules-team at lists.alioth.debian.org>
Date:   Thu Oct 8 13:29:41 2015 -0700

    Hardcode the libudev SONAME that the package depends on.
    
     This makes sure that we don't load an untested ABI.
    Bu-Debian: https://bugs.debian.org/722573
    
    Patch-Name: libudev_loading.diff
---
 src/pyudev/_ctypeslib/utils.py | 5 ++++-
 src/pyudev/core.py             | 2 +-
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/src/pyudev/_ctypeslib/utils.py b/src/pyudev/_ctypeslib/utils.py
index d10b6c9..6efd18e 100644
--- a/src/pyudev/_ctypeslib/utils.py
+++ b/src/pyudev/_ctypeslib/utils.py
@@ -51,7 +51,10 @@ def load_ctypes_library(name, signatures, error_checkers):
     :rtype: ctypes.CDLL
     :raises ImportError: if the library is not found
     """
-    library_name = find_library(name)
+    if if ".so" in name:
+        library_name = name
+    else:
+        library_name = find_library(name)
     if not library_name:
         raise ImportError('No library named %s' % name)
     lib = CDLL(library_name, use_errno=True)
diff --git a/src/pyudev/core.py b/src/pyudev/core.py
index de6f245..0e44ca2 100644
--- a/src/pyudev/core.py
+++ b/src/pyudev/core.py
@@ -61,7 +61,7 @@ class Context(object):
         """
         Create a new context.
         """
-        self._libudev = load_ctypes_library('udev', SIGNATURES, ERROR_CHECKERS)
+        self._libudev = load_ctypes_library('libudev.so.1', SIGNATURES, ERROR_CHECKERS)
         self._as_parameter_ = self._libudev.udev_new()
 
     def __del__(self):

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



More information about the Python-modules-commits mailing list