On Sat, 04 Feb 2012 13:06:35 +0100, Sebastian Ramacher wrote: > This seems to be fixed with the new upstream release (1.2.4). The > ctypes.util.find_library call has been replaced by routine to find the library > with the correct soname.
I'm attaching the diff of the upstream change mentioned by Sebastian for reference. Cheers, gregor -- .''`. Homepage: http://info.comodo.priv.at/ - OpenPGP key 0xBB3A68018649AA06 : :' : Debian GNU/Linux user, admin, and developer - http://www.debian.org/ `. `' Member of VIBE!AT & SPI, fellow of the Free Software Foundation Europe `- NP: Beatles
--- gnutls/library/__init__.py 2010-01-26 13:46:04.000000000 +0100 +++ /tmp/python-gnutls-1.2.4/gnutls/library/__init__.py 2011-11-11 18:23:49.000000000 +0100 @@ -15,39 +15,29 @@ def library_locations(name, version): import os - from ctypes.util import find_library - + system = get_system_name() if system == 'darwin': library_name = 'lib%s.%d.dylib' % (name, version) - library_alias = 'lib%s.dylib' % name - search_name = name + dynamic_loader_env_vars = ['DYLD_LIBRARY_PATH', 'LD_LIBRARY_PATH'] additional_paths = ['/usr/local/lib', '/opt/local/lib', '/sw/lib'] elif system == 'windows': library_name = 'lib%s-%d.dll' % (name, version) - library_alias = 'lib%s.dll' % name - search_name = 'lib%s-%d' % (name, version) - additional_paths = [] + dynamic_loader_env_vars = ['PATH'] + additional_paths = ['.'] elif system == 'cygwin': library_name = 'cyg%s-%d.dll' % (name, version) - library_alias = 'cyg%s.dll' % name - search_name = 'cyg%s-%d' % (name, version) + dynamic_loader_env_vars = ['LD_LIBRARY_PATH'] additional_paths = ['/usr/bin'] else: library_name = 'lib%s.so.%d' % (name, version) - library_alias = 'lib%s.so' % name - search_name = name + dynamic_loader_env_vars = ['LD_LIBRARY_PATH'] additional_paths = ['/usr/local/lib'] - library = find_library(search_name) - if library is not None: - yield library - library = find_library(library_name) - if library is not None: - yield library - for path in additional_paths: + for path in (path for env_var in dynamic_loader_env_vars for path in os.environ.get(env_var, '').split(':') if os.path.isdir(path)): yield os.path.join(path, library_name) + yield library_name for path in additional_paths: - yield os.path.join(path, library_alias) + yield os.path.join(path, library_name) def load_library(name, version):
signature.asc
Description: Digital signature