[h5py] 208/455: Move LZF filter to separate directory

Ghislain Vaillant ghisvail-guest at moszumanska.debian.org
Thu Jul 2 18:19:33 UTC 2015


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

ghisvail-guest pushed a commit to annotated tag 1.3.0
in repository h5py.

commit 1adce1811d81eeba8eab667e8ff6d7a9d7cfb426
Author: andrewcollette <andrew.collette at gmail.com>
Date:   Thu Jan 29 04:27:14 2009 +0000

    Move LZF filter to separate directory
---
 lzf/LICENSE.txt            | 34 ++++++++++++++++++++++++++++++++++
 {h5py => lzf}/lzf/lzf.h    |  0
 {h5py => lzf}/lzf/lzfP.h   |  0
 {h5py => lzf}/lzf/lzf_c.c  |  0
 {h5py => lzf}/lzf/lzf_d.c  |  0
 {h5py => lzf}/lzf_filter.c |  2 +-
 {h5py => lzf}/lzf_filter.h |  4 ++--
 setup.py                   | 20 ++++++++++++++------
 8 files changed, 51 insertions(+), 9 deletions(-)

diff --git a/lzf/LICENSE.txt b/lzf/LICENSE.txt
new file mode 100644
index 0000000..3787a00
--- /dev/null
+++ b/lzf/LICENSE.txt
@@ -0,0 +1,34 @@
+Copyright Notice and Statement for LZF filter
+
+Copyright (c) 2008-2009 Andrew Collette
+http://h5py.alfven.org
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are
+met:
+
+a. Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+
+b. Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in the
+   documentation and/or other materials provided with the
+   distribution.
+
+c. Neither the name of the author nor the names of contributors may 
+   be used to endorse or promote products derived from this software 
+   without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
diff --git a/h5py/lzf/lzf.h b/lzf/lzf/lzf.h
similarity index 100%
rename from h5py/lzf/lzf.h
rename to lzf/lzf/lzf.h
diff --git a/h5py/lzf/lzfP.h b/lzf/lzf/lzfP.h
similarity index 100%
rename from h5py/lzf/lzfP.h
rename to lzf/lzf/lzfP.h
diff --git a/h5py/lzf/lzf_c.c b/lzf/lzf/lzf_c.c
similarity index 100%
rename from h5py/lzf/lzf_c.c
rename to lzf/lzf/lzf_c.c
diff --git a/h5py/lzf/lzf_d.c b/lzf/lzf/lzf_d.c
similarity index 100%
rename from h5py/lzf/lzf_d.c
rename to lzf/lzf/lzf_d.c
diff --git a/h5py/lzf_filter.c b/lzf/lzf_filter.c
similarity index 98%
rename from h5py/lzf_filter.c
rename to lzf/lzf_filter.c
index c382951..96bb30a 100644
--- a/h5py/lzf_filter.c
+++ b/lzf/lzf_filter.c
@@ -97,7 +97,7 @@ size_t lzf_filter(unsigned flags, size_t cd_nelmts,
 
         /* Allocate an output buffer exactly as long as the input data; if
            the result is larger, we simply return 0.  The filter is flagged
-           as optional, so HDF5 simply marks the chunk as uncompressed and
+           as optional, so HDF5 marks the chunk as uncompressed and
            proceeds.
         */
 
diff --git a/h5py/lzf_filter.h b/lzf/lzf_filter.h
similarity index 92%
rename from h5py/lzf_filter.h
rename to lzf/lzf_filter.h
index 9e8951c..d24601f 100644
--- a/h5py/lzf_filter.h
+++ b/lzf/lzf_filter.h
@@ -15,8 +15,8 @@
     with PyTables LZO/BZIP2 implementation.
 */
 
-#ifndef H5PY_LZF_FILTER
-#define H5PY_LZF_FILTER
+#ifndef H5PY_LZF_H
+#define H5PY_LZF_H
 
 #define H5PY_FILTER_LZF 315
 
diff --git a/setup.py b/setup.py
index df54052..5c68d01 100644
--- a/setup.py
+++ b/setup.py
@@ -33,9 +33,6 @@ SRC_PATH = 'h5py'           # Name of directory with .pyx files
 
 USE_DISTUTILS = False
 
-MODULES = ['h5', 'h5f', 'h5g', 'h5s', 'h5t', 'h5d', 'h5a', 'h5p', 'h5z',
-                 'h5i', 'h5r', 'h5fd', 'utils', 'h5o', 'h5l']
-EXTRA_SRC = {'h5': ["lzf_filter.c", "lzf/lzf_c.c", "lzf/lzf_d.c"]}
 
 def version_check(vers, required):
     """ Compare versions between two "."-separated strings. """
@@ -59,6 +56,12 @@ def debug(instring):
 def localpath(*args):
     return op.abspath(reduce(op.join, (op.dirname(__file__),)+args))
 
+MODULES = ['h5', 'h5f', 'h5g', 'h5s', 'h5t', 'h5d', 'h5a', 'h5p', 'h5z',
+                 'h5i', 'h5r', 'h5fd', 'utils', 'h5o', 'h5l']
+
+EXTRA_SRC = {'h5': [ localpath("lzf/lzf_filter.c"), 
+                     localpath("lzf/lzf/lzf_c.c"),
+                     localpath("lzf/lzf/lzf_d.c") ]    }
 
 # --- Imports -----------------------------------------------------------------
 
@@ -200,7 +203,10 @@ class ExtensionCreator(object):
                 fatal("On Windows, HDF5 directory must be specified.")
 
             self.libraries = ['hdf5dll18']
-            self.include_dirs = [numpy.get_include(), op.join(hdf5_loc, 'include'), op.abspath('win_include')]
+            self.include_dirs = [numpy.get_include(),
+                                 op.join(hdf5_loc, 'include'),
+                                 localpath('lzf'),
+                                 localpath('win_include')]
             self.library_dirs = [op.join(hdf5_loc, 'dll')]
             self.runtime_dirs = []
             self.extra_compile_args = ['/DH5_USE_16_API', '/D_HDF5USEDLL_']
@@ -209,11 +215,13 @@ class ExtensionCreator(object):
         else:
             self.libraries = ['hdf5']
             if hdf5_loc is None:
-                self.include_dirs = [numpy.get_include(), '/usr/include', '/usr/local/include']
+                self.include_dirs = [numpy.get_include(), 
+                                     '/usr/include', '/usr/local/include']
                 self.library_dirs = ['/usr/lib/', '/usr/local/lib']
             else:
                 self.include_dirs = [numpy.get_include(), op.join(hdf5_loc, 'include')]
                 self.library_dirs = [op.join(hdf5_loc, 'lib')]
+            self.include_dirs += [localpath('lzf')]
             self.runtime_dirs = self.library_dirs
             self.extra_compile_args = ['-DH5_USE_16_API', '-Wno-unused', '-Wno-uninitialized']
             self.extra_link_args = []
@@ -226,7 +234,7 @@ class ExtensionCreator(object):
         """
         if extra_src is None:
             extra_src = []
-        sources = [op.join(SRC_PATH, name+'.c')]+[op.join(SRC_PATH,x) for x in extra_src]
+        sources = [op.join(SRC_PATH, name+'.c')]+[x for x in extra_src]
         return Extension(NAME+'.'+name,
                             sources, 
                             include_dirs = self.include_dirs, 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/h5py.git



More information about the debian-science-commits mailing list