[h5py] 10/455: GroupStat bug on OS X, setup tweaks for /usr/local

Ghislain Vaillant ghisvail-guest at moszumanska.debian.org
Thu Jul 2 18:19:12 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 1ec50f3217c9e9d1574ec96e0718b8bb4b5791db
Author: andrewcollette <andrew.collette at gmail.com>
Date:   Wed May 7 00:37:24 2008 +0000

    GroupStat bug on OS X, setup tweaks for /usr/local
---
 h5py/h5g.pyx | 10 +++-------
 setup.py     | 12 ++++++++++--
 2 files changed, 13 insertions(+), 9 deletions(-)

diff --git a/h5py/h5g.pyx b/h5py/h5g.pyx
index d792fc6..e4eb476 100755
--- a/h5py/h5g.pyx
+++ b/h5py/h5g.pyx
@@ -213,7 +213,7 @@ def get_objinfo(hid_t loc_id, char* name, int follow_link=1):
     """
     cdef int retval
     cdef H5G_stat_t stat
-    cdef object statobj
+    cdef GroupStat statobj
 
     retval = H5Gget_objinfo(loc_id, name, follow_link, &stat)
     if retval < 0:
@@ -223,7 +223,7 @@ def get_objinfo(hid_t loc_id, char* name, int follow_link=1):
     statobj.fileno = (stat.fileno[0], stat.fileno[1])
     statobj.objno = (stat.objno[0], stat.objno[1])
     statobj.nlink = stat.nlink
-    statobj.type = <int>stat.type
+    statobj.type = stat.type
     statobj.mtime = stat.mtime
     statobj.linklen = stat.linklen
 
@@ -256,12 +256,8 @@ def iterate(hid_t loc_id, char* name, object func, object data=None, int startid
         Iterate an arbitrary Python function over a group.  Note that the
         group is specified by a parent and a name; if you have a group
         identifier and want to iterate over it; pass in "." for the name.
-
         You can also start at an arbitrary member by specifying its 
-        (zero-based) index.  The return value is the index of the last 
-        group member successfully processed; if there are three elements 
-        (indices 0, 1, 2) and the last one raises StopIteration, the return
-        value is 1.
+        (zero-based) index.
 
         Your function:
         1.  Should accept three arguments: the (INT) id of the group, the 
diff --git a/setup.py b/setup.py
index 549f4dd..4f12c5a 100755
--- a/setup.py
+++ b/setup.py
@@ -60,6 +60,10 @@ NAME = 'h5py'
 VERSION = '0.1.0'
 REVISION = "$Rev: 0$"
 
+# If you have your HDF5 *.h files, etc somewhere not in /usr/include or
+# /usr/local/include, add that path here.
+custom_include_dirs = []    # = ["/some/other/path", "/an/other/path"]
+
 # === Custom extensions for distutils =========================================
 
 class test(Command):
@@ -148,7 +152,7 @@ def fatal(instring):
     print "Fatal: "+instring
     exit(2)
 
-# Python version
+# Check Python version
 if not (sys.version_info[0] >= 2 and sys.version_info[1] >= 5):
     fatal("At least Python 2.5 is required to install h5py")
 
@@ -178,7 +182,11 @@ pyx_modules = ['h5' , 'h5f', 'h5g', 'h5s', 'h5t',
 pyx_src_path = 'h5py'
 pyx_extra_src = ['utils.c']         # C source files required for Pyrex code
 pyx_libraries = ['hdf5']            # Libraries to link into Pyrex code
-pyx_include = [numpy.get_include()] # Compile-time include dirs for Pyrex code
+
+# Compile-time include dirs for Pyrex code
+pyx_include = [numpy.get_include()] 
+pyx_include.extend(['/usr/include', '/usr/local/include'])
+pyx_include.extend(custom_include_dirs)
 
 # Additional compiler flags for Pyrex code
 pyx_extra_args = ['-Wno-unused', '-DH5_USE_16_API']

-- 
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