--- python-gnutls-1.2.0.orig/gnutls/library/__init__.py +++ python-gnutls-1.2.0/gnutls/library/__init__.py @@ -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): @@ -117,6 +107,7 @@ gcry_control = libgnutls.gcry_control gcry_control(GCRYCTL_SET_THREAD_CBS, c_void_p(gcrypt_thread_callbacks_ptr)) + libgnutls.gcry_check_version('1.2.4') # GNUTLS_MIN_LIBGCRYPT_VERSION if system == 'cygwin': gcry_control(GCRYCTL_DISABLE_SECMEM, 0) else: --- python-gnutls-1.2.0.orig/debian/copyright +++ python-gnutls-1.2.0/debian/copyright @@ -0,0 +1,38 @@ +This package was debianized by Dan Pascu on +Thu, 29 Mar 2007 09:22:44 +0300 + +It was downloaded from http://cheeseshop.python.org/pypi/python-gnutls + +Upstream Authors: + + Dan Pascu + Mircea Amarascu + +Copyright: + + Copyright (C) 2006-2007 AG Projects + Dan Pascu + Mircea Amarascu + +License: + + This package is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This package is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public + License along with this package; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +On Debian systems, the complete text of the GNU Lesser General +Public License can be found in `/usr/share/common-licenses/LGPL'. + +The Debian packaging is (C) 2007, Dan Pascu and +Bernd Zeimetz , it is licensed under the LGPL, see above. + --- python-gnutls-1.2.0.orig/debian/changelog +++ python-gnutls-1.2.0/debian/changelog @@ -0,0 +1,121 @@ +python-gnutls (1.2.0-2.1ubuntu0.1) precise-proposed; urgency=low + + [ Jack Bates ] + * gcry_check_version must be invoked before any other function in the + library, with the exception of the GCRYCTL_SET_THREAD_CBS command (called + via the gcry_control function). (LP: #1013798) + + -- Adam Stokes Tue, 02 Apr 2013 09:42:32 -0400 + +python-gnutls (1.2.0-2.1) unstable; urgency=low + + * Non-maintainer upload. + * Fix "gnutls.library.functions fails with libgnutls28-3.0.8-2": + apply patch taken from upstream 1.2.4 release. (Closes: #651865) + + -- gregor herrmann Sat, 03 Mar 2012 15:05:46 +0100 + +python-gnutls (1.2.0-2) unstable; urgency=low + + * Depend on libgnutls26 as the library is used via ctypes now. + A better solution will be implemented after Squeeze. + + -- Bernd Zeimetz Wed, 06 Oct 2010 16:53:00 +0200 + +python-gnutls (1.2.0-1) unstable; urgency=low + + * New upstream version. + + -- Bernd Zeimetz Tue, 02 Feb 2010 21:14:38 +0100 + +python-gnutls (1.1.9-2) unstable; urgency=low + + [ Luca Falavigna ] + * debian/control: + - Build-depend on python-all-dev (>= 2.5). + - Add XS-Python-Version field. + - Drop python-ctypes from Depends (Closes: #562481). + + [ Bernd Zeimetz ] + * Bumping Standards-Version to 3.8.3, no changes needed. + + -- Bernd Zeimetz Sun, 10 Jan 2010 15:25:49 +0100 + +python-gnutls (1.1.9-1) unstable; urgency=low + + * New upstream release. + * Bumping Standards-Version to 3.8.2, no changes needed. + + -- Bernd Zeimetz Wed, 15 Jul 2009 22:17:08 +0200 + +python-gnutls (1.1.8-1) unstable; urgency=low + + [ Bernd Zeimetz ] + * New upstream version + * debian/control: + - Rising libgnutls build dependency to (>= 2.4.1) + - Bumping Standards-Version, no changes needed. + + [ Sandro Tosi ] + * debian/control + - switch Vcs-Browser field to viewsvn + + -- Bernd Zeimetz Sun, 15 Feb 2009 23:28:46 +0100 + +python-gnutls (1.1.6-1) unstable; urgency=low + + * New upstream version. + + -- Bernd Zeimetz Thu, 24 Jul 2008 01:59:04 +0200 + +python-gnutls (1.1.5-2) unstable; urgency=low + + * debian/control: + - The minimal version of libgnutls-dev needs to be (>= 2.2.2). + + -- Bernd Zeimetz Thu, 08 May 2008 09:43:33 +0200 + +python-gnutls (1.1.5-1) unstable; urgency=low + + * New upstream release. + + [ Bernd Zeimetz ] + * debian/control: + - Adding Homepage field, removing pseudo-field from description + - Rename XS-Vcs-* fields to Vcs-* (dpkg supports them now) + - Updating my email address + - Bumping Standards-Version to 3.7.3, no changes needed. + - Remove -1 revision from python-all-dev Build-Dep. + - Fix minor spelling error in the description. + + [ Sandro Tosi ] + * debian/watch + - url simplification for new pypi + * debian/control + - uniforming Vcs-Browser field + + -- Bernd Zeimetz Wed, 07 May 2008 18:09:02 +0200 + +python-gnutls (1.1.4-1) unstable; urgency=low + + * New upstream version + * debian/control: + - Adding XS-Vcs-Svn and XS-Vcs-Browser fields + + -- Bernd Zeimetz Thu, 20 Sep 2007 19:34:37 +0200 + +python-gnutls (1.1.3-1) unstable; urgency=low + + [ Bernd Zeimetz ] + * New upstream version + + [ Piotr Ożarowski ] + * Provide pythonX.Y-gnutls packages + + -- Bernd Zeimetz Sat, 25 Aug 2007 19:52:30 +0200 + +python-gnutls (1.1.2-1) unstable; urgency=low + + * Initial release (Closes: #428866) + + -- Bernd Zeimetz Thu, 14 Jun 2007 20:15:56 +0100 --- python-gnutls-1.2.0.orig/debian/rules +++ python-gnutls-1.2.0/debian/rules @@ -0,0 +1,11 @@ +#!/usr/bin/make -f + +DEB_PYTHON_SYSTEM=pysupport +DEB_COMPRESS_EXCLUDE := .py + +include /usr/share/cdbs/1/rules/debhelper.mk +include /usr/share/cdbs/1/class/python-distutils.mk + +clean:: + rm -rf dist MANIFEST + --- python-gnutls-1.2.0.orig/debian/control +++ python-gnutls-1.2.0/debian/control @@ -0,0 +1,30 @@ +Source: python-gnutls +Section: python +Priority: optional +Maintainer: Debian Python Modules Team +Uploaders: Bernd Zeimetz , Dan Pascu +Build-Depends: cdbs (>= 0.4.47), debhelper (>= 5.0.42), python-all-dev (>= 2.5), python-support, libgnutls-dev (>= 2.4.1) +Standards-Version: 3.8.3 +XS-Python-Version: >= 2.5 +Homepage: http://cheeseshop.python.org/pypi/python-gnutls +Vcs-Svn: svn://svn.debian.org/python-modules/packages/python-gnutls/trunk/ +Vcs-Browser: http://svn.debian.org/viewsvn/python-modules/packages/python-gnutls/trunk/ + +Package: python-gnutls +Architecture: any +Depends: ${python:Depends}, ${misc:Depends}, ${shlibs:Depends}, libgnutls26 (>= 2.4.1) +Recommends: python-twisted-core +Provides: ${python:Provides} +Description: Python wrapper for the GNUTLS library + This package provides a high level object oriented wrapper around + libgnutls, as well as low level bindings to the GNUTLS types and + functions via ctypes. The high level wrapper hides the details of + accessing the GNUTLS library via ctypes behind a set of classes + that encapsulate GNUTLS sessions, certificates and credentials and + expose them to Python applications using a simple API. + . + The package also includes a Twisted interface that has seamless + intergration with Twisted, providing connectTLS and listenTLS + methods on the Twisted reactor once imported (the methods are + automatically attached to the reactor by simply importing the + GNUTLS Twisted interface module). --- python-gnutls-1.2.0.orig/debian/compat +++ python-gnutls-1.2.0/debian/compat @@ -0,0 +1 @@ +5 --- python-gnutls-1.2.0.orig/debian/watch +++ python-gnutls-1.2.0/debian/watch @@ -0,0 +1,5 @@ +# Compulsory line, this is a version 3 file +version=3 + +http://pypi.python.org/packages/source/p/python-gnutls/python-gnutls-(.*)\.tar\.gz + --- python-gnutls-1.2.0.orig/debian/examples +++ python-gnutls-1.2.0/debian/examples @@ -0,0 +1 @@ +examples/* --- python-gnutls-1.2.0.orig/debian/pycompat +++ python-gnutls-1.2.0/debian/pycompat @@ -0,0 +1 @@ +2 --- python-gnutls-1.2.0.orig/debian/source/format +++ python-gnutls-1.2.0/debian/source/format @@ -0,0 +1 @@ +1.0