[SCM] Packaging for pytables branch, master, updated. debian/2.3.1-2-20-ge1e005b

Julian Taylor jtaylor.debian at googlemail.com
Mon Mar 5 21:20:39 UTC 2012


The following commit has been merged in the master branch:
commit 3aa48e3ae0f3ff2bef713cb84320940e1e282e7f
Author: Julian Taylor <jtaylor.debian at googlemail.com>
Date:   Mon Mar 5 19:20:27 2012 +0100

    really reenable bzip and lzo2

diff --git a/debian/changelog b/debian/changelog
index a88156c..fbf5344 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -16,7 +16,11 @@ pytables (2.3.1-3) unstable; urgency=low
   * Patch up_skip_multiprocessing_test_on_gnu to disable test on Hurd and
     kFreeBSD systems -- multiprocessing locking seems to be N/A
 
- -- Antonio Valentino <antonio.valentino at tiscali.it>  Sat, 03 Mar 2012 12:34:43 +0100
+  [ Julian Taylor ]
+  * fix_library_detection.patch:
+    fixes detection of multiarched bzip and lzo2 (Closes: #657789)
+
+ -- Julian Taylor <jtaylor.debian at googlemail.com>  Mon, 05 Mar 2012 19:18:38 +0100
 
 pytables (2.3.1-2) unstable; urgency=low
 
diff --git a/debian/patches/fix_library_detection.patch b/debian/patches/fix_library_detection.patch
new file mode 100644
index 0000000..26441ac
--- /dev/null
+++ b/debian/patches/fix_library_detection.patch
@@ -0,0 +1,118 @@
+From: Antonio Valentino <antonio.valentino at tiscali.it>
+Date: Sun, 19 Feb 2012 18:26:25 +0100
+Subject: Fix the detection of multiarched libraries
+
+Origin: https://github.com/avalentino/PyTables/commit/b26297256ed94ee34b65429520fb9adf1686fc04
+Bug: https://github.com/PyTables/PyTables/issues/124
+Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=657789
+Forwarded: yes
+
+---
+ setup.py          |   37 ++++++++++++++++++++++++++++---------
+ 1 file changed, 28 insertions(+), 9 deletions(-)
+
+--- a/setup.py
++++ b/setup.py
+@@ -21,6 +21,7 @@
+ from distutils.core     import Extension
+ from distutils.dep_util import newer
+ from distutils.util     import convert_path
++from distutils.ccompiler import new_compiler
+ 
+ # The minimum required versions
+ # (keep these in sync with tables.req_versions and user's guide and README)
+@@ -241,12 +242,14 @@
+ 
+     _component_dirs = ['include', 'lib']
+ 
+-    def __init__(self, name, tag, header_name, library_name):
++    def __init__(self, name, tag, header_name, library_name,
++                 target_function=None):
+         self.name = name
+         self.tag = tag
+         self.header_name = header_name
+         self.library_name = library_name
+         self.runtime_name = library_name
++        self.target_function = target_function
+ 
+ class WindowsPackage(Package):
+     _library_prefixes = ['']
+@@ -257,12 +260,14 @@
+     # lookup in '.' seems necessary for LZO2
+     _component_dirs = ['include', 'lib', 'dll', '.']
+ 
+-    def __init__(self, name, tag, header_name, library_name, runtime_name):
++    def __init__(self, name, tag, header_name, library_name, runtime_name,
++                 target_function=None):
+         self.name = name
+         self.tag = tag
+         self.header_name = header_name
+         self.library_name = library_name
+         self.runtime_name = runtime_name
++        self.target_function = target_function
+ 
+     def find_runtime_path(self, locations=default_runtime_dirs):
+         # An explicit path can not be provided for runtime libraries.
+@@ -319,10 +324,14 @@
+     if '--debug' in sys.argv:
+         _platdep['HDF5'] = ['hdf5ddll', 'hdf5ddll']
+ 
+-hdf5_package = _Package("HDF5", 'HDF5', 'H5public', *_platdep['HDF5'])
+-lzo2_package = _Package("LZO 2", 'LZO2', _cp('lzo/lzo1x'), *_platdep['LZO2'])
+-lzo1_package = _Package("LZO 1", 'LZO', 'lzo1x', *_platdep['LZO'])
+-bzip2_package = _Package("bzip2", 'BZ2', 'bzlib', *_platdep['BZ2'])
++hdf5_package = _Package("HDF5", 'HDF5', 'H5public', *_platdep['HDF5'],
++                        target_function='H5close')
++lzo2_package = _Package("LZO 2", 'LZO2', _cp('lzo/lzo1x'), *_platdep['LZO2'],
++                        target_function='lzo_version_date')
++lzo1_package = _Package("LZO 1", 'LZO', 'lzo1x', *_platdep['LZO'],
++                        target_function='lzo_version_date')
++bzip2_package = _Package("bzip2", 'BZ2', 'bzlib', *_platdep['BZ2'],
++                         target_function='BZ2_bzlibVersion')
+ 
+ 
+ #-----------------------------------------------------------------
+@@ -383,6 +392,7 @@
+ 
+ # Try to locate the compulsory and optional libraries.
+ lzo2_enabled = False
++c = new_compiler()
+ for (package, location) in [
+     (hdf5_package, HDF5_DIR),
+     (lzo2_package, LZO_DIR),
+@@ -397,6 +407,11 @@
+ 
+     (hdrdir, libdir, rundir) = package.find_directories(location)
+ 
++    # check if the library is in the standard compiler paths
++    if not libdir:
++        libdir = c.has_function(package.target_function,
++                                libraries=(package.library_name,))
++
+     if not (hdrdir and libdir):
+         if package.tag in ['HDF5']:  # these are compulsory!
+             pname, ptag = package.name, package.tag
+@@ -411,8 +426,12 @@
+                 "disabling support for it."  % package.name)
+         continue  # look for the next library
+ 
+-    print ( "* Found %s headers at ``%s``, library at ``%s``."
+-            % (package.name, hdrdir, libdir) )
++    if libdir in ("", True):
++        print ( "* Found %s headers at ``%s``, the library is located in the "
++                "standard system search dirs." % (package.name, hdrdir) )
++    else:
++        print ( "* Found %s headers at ``%s``, library at ``%s``."
++                % (package.name, hdrdir, libdir) )
+ 
+     if package.tag in ['HDF5']:
+         hdf5_header = os.path.join(hdrdir, "H5public.h")
+@@ -423,7 +442,7 @@
+ 
+     if hdrdir not in default_header_dirs:
+         inc_dirs.append(hdrdir)  # save header directory if needed
+-    if libdir not in default_library_dirs:
++    if libdir not in default_library_dirs and libdir not in ("", True):
+         # save library directory if needed
+         if os.name == "nt":
+             # Important to quote the libdir for Windows (Vista) systems
diff --git a/debian/patches/series b/debian/patches/series
index a4f72f0..531c18b 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,4 @@
 up_skip_multiprocessing_test_on_gnu
 fix_unaligned_mem_access
+fix_library_detection.patch
 

-- 
Packaging for pytables



More information about the debian-science-commits mailing list