[Git][debian-gis-team/python-hdf4][upstream] New upstream version 0.9.2

Antonio Valentino gitlab at salsa.debian.org
Wed Feb 20 07:09:11 GMT 2019


Antonio Valentino pushed to branch upstream at Debian GIS Project / python-hdf4


Commits:
e9aae2c6 by Antonio Valentino at 2019-02-20T06:42:11Z
New upstream version 0.9.2
- - - - -


6 changed files:

- doc/install.rst
- pyhdf/SD.py
- pyhdf/hdfext.py
- pyhdf/hdfext_wrap.c
- pyhdf/test_SD.py
- setup.py


Changes:

=====================================
doc/install.rst
=====================================
@@ -30,9 +30,9 @@ The following packages are required to build and install Python-HDF4:
 - `libjpeg <http://www.ijg.org/>`_ 
 
 On Debian and Debian-based Linux distributions (e.g. Ubuntu), you can install
-all the requirements using this command::
+all the requirements for Python 3 using this command::
 
-    apt-get install python-dev python-numpy libhdf4-dev -y
+    apt-get install build-essential python3-dev python3-numpy libhdf4-dev -y
 
 OS X users can obtain jpeg libraries `here
 <http://ethan.tira-thompson.com/Mac%20OS%20X%20Ports.html>`_. 


=====================================
pyhdf/SD.py
=====================================
@@ -1304,21 +1304,7 @@ class SDAttr(object):
             buf = _C.array_byte(n_values)
 
         elif data_type == SDC.INT8:
-            # SWIG refuses negative values here. We found that if we
-            # pass them as byte values, it will work.
             buf = _C.array_int8(n_values)
-            values = list(values)
-            for n in range(n_values):
-                v = values[n]
-                if v >= 0:
-                    v &= 0x7f
-                else:
-                    v = abs(v) & 0x7f
-                    if v:
-                        v = 256 - v
-                    else:
-                        v = 128         # -128 in 2s complement
-                values[n] = v
 
         elif data_type == SDC.INT16:
             buf = _C.array_int16(n_values)
@@ -2538,17 +2524,7 @@ class SDS(object):
             buf = _C.array_byte(n_values)
 
         elif data_type == SDC.INT8:
-            # SWIG refuses negative values here. We found that if we
-            # pass them as byte values, it will work.
             buf = _C.array_int8(n_values)
-            if fill_val >= 0:
-                fill_val &= 0x7f
-            else:
-                fill_val = abs(fill_val) & 0x7f
-                if fill_val:
-                    fill_val = 256 - fill_val
-                else:
-                    fill_val = 128    # -128 in 2's complement
 
         elif data_type == SDC.INT16:
             buf = _C.array_int16(n_values)
@@ -2617,30 +2593,8 @@ class SDS(object):
             buf2 = _C.array_byte(n_values)
 
         elif data_type == SDC.INT8:
-            # SWIG refuses negative values here. We found that if we
-            # pass them as byte values, it will work.
             buf1 = _C.array_int8(n_values)
             buf2 = _C.array_int8(n_values)
-            v = min
-            if v >= 0:
-                v &= 0x7f
-            else:
-                v = abs(v) & 0x7f
-                if v:
-                    v = 256 - v
-                else:
-                    v = 128    # -128 in 2's complement
-            min = v
-            v = max
-            if v >= 0:
-                v &= 0x7f
-            else:
-                v = abs(v) & 0x7f
-                if v:
-                    v = 256 - v
-                else:
-                    v = 128    # -128 in 2's complement
-            max = v
 
         elif data_type == SDC.INT16:
             buf1 = _C.array_int16(n_values)
@@ -3113,21 +3067,7 @@ class SDim(object):
             buf = _C.array_byte(n_values)
 
         elif data_type == SDC.INT8:
-            # SWIG refuses negative values here. We found that if we
-            # pass them as byte values, it will work.
             buf = _C.array_int8(n_values)
-            scale = list(scale)
-            for n in range(n_values):
-                v = scale[n]
-                if v >= 0:
-                    v &= 0x7f
-                else:
-                    v = abs(v) & 0x7f
-                    if v:
-                        v = 256 - v
-                    else:
-                        v = 128         # -128 in 2's complement
-                scale[n] = v
 
         elif data_type == SDC.INT16:
             buf = _C.array_int16(n_values)


=====================================
pyhdf/hdfext.py
=====================================
@@ -1,15 +1,22 @@
 # This file was automatically generated by SWIG (http://www.swig.org).
-# Version 3.0.2
+# Version 3.0.12
 #
 # Do not make changes to this file unless you know what you are doing--modify
 # the SWIG interface file instead.
 
-
-
-
-
-from sys import version_info
-if version_info >= (2,6,0):
+from sys import version_info as _swig_python_version_info
+if _swig_python_version_info >= (2, 7, 0):
+    def swig_import_helper():
+        import importlib
+        pkg = __name__.rpartition('.')[0]
+        mname = '.'.join((pkg, '_hdfext')).lstrip('.')
+        try:
+            return importlib.import_module(mname)
+        except ImportError:
+            return importlib.import_module('_hdfext')
+    _hdfext = swig_import_helper()
+    del swig_import_helper
+elif _swig_python_version_info >= (2, 6, 0):
     def swig_import_helper():
         from os.path import dirname
         import imp
@@ -19,56 +26,75 @@ if version_info >= (2,6,0):
         except ImportError:
             import _hdfext
             return _hdfext
-        if fp is not None:
-            try:
-                _mod = imp.load_module('_hdfext', fp, pathname, description)
-            finally:
+        try:
+            _mod = imp.load_module('_hdfext', fp, pathname, description)
+        finally:
+            if fp is not None:
                 fp.close()
-            return _mod
+        return _mod
     _hdfext = swig_import_helper()
     del swig_import_helper
 else:
     import _hdfext
-del version_info
+del _swig_python_version_info
+
 try:
     _swig_property = property
 except NameError:
-    pass # Python < 2.2 doesn't have 'property'.
-def _swig_setattr_nondynamic(self,class_type,name,value,static=1):
-    if (name == "thisown"): return self.this.own(value)
+    pass  # Python < 2.2 doesn't have 'property'.
+
+try:
+    import builtins as __builtin__
+except ImportError:
+    import __builtin__
+
+def _swig_setattr_nondynamic(self, class_type, name, value, static=1):
+    if (name == "thisown"):
+        return self.this.own(value)
     if (name == "this"):
         if type(value).__name__ == 'SwigPyObject':
             self.__dict__[name] = value
             return
-    method = class_type.__swig_setmethods__.get(name,None)
-    if method: return method(self,value)
+    method = class_type.__swig_setmethods__.get(name, None)
+    if method:
+        return method(self, value)
     if (not static):
-        self.__dict__[name] = value
+        if _newclass:
+            object.__setattr__(self, name, value)
+        else:
+            self.__dict__[name] = value
     else:
         raise AttributeError("You cannot add attributes to %s" % self)
 
-def _swig_setattr(self,class_type,name,value):
-    return _swig_setattr_nondynamic(self,class_type,name,value,0)
 
-def _swig_getattr(self,class_type,name):
-    if (name == "thisown"): return self.this.own()
-    method = class_type.__swig_getmethods__.get(name,None)
-    if method: return method(self)
-    raise AttributeError(name)
+def _swig_setattr(self, class_type, name, value):
+    return _swig_setattr_nondynamic(self, class_type, name, value, 0)
+
+
+def _swig_getattr(self, class_type, name):
+    if (name == "thisown"):
+        return self.this.own()
+    method = class_type.__swig_getmethods__.get(name, None)
+    if method:
+        return method(self)
+    raise AttributeError("'%s' object has no attribute '%s'" % (class_type.__name__, name))
+
 
 def _swig_repr(self):
-    try: strthis = "proxy of " + self.this.__repr__()
-    except: strthis = ""
+    try:
+        strthis = "proxy of " + self.this.__repr__()
+    except __builtin__.Exception:
+        strthis = ""
     return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)
 
 try:
     _object = object
     _newclass = 1
-except AttributeError:
-    class _object : pass
+except __builtin__.Exception:
+    class _object:
+        pass
     _newclass = 0
 
-
 DFNT_NONE = _hdfext.DFNT_NONE
 DFNT_QUERY = _hdfext.DFNT_QUERY
 DFNT_VERSION = _hdfext.DFNT_VERSION
@@ -125,22 +151,33 @@ class array_byte(_object):
     __swig_getmethods__ = {}
     __getattr__ = lambda self, name: _swig_getattr(self, array_byte, name)
     __repr__ = _swig_repr
-    def __init__(self, *args): 
-        this = _hdfext.new_array_byte(*args)
-        try: self.this.append(this)
-        except: self.this = this
+
+    def __init__(self, nelements):
+        this = _hdfext.new_array_byte(nelements)
+        try:
+            self.this.append(this)
+        except __builtin__.Exception:
+            self.this = this
     __swig_destroy__ = _hdfext.delete_array_byte
-    __del__ = lambda self : None;
-    def __getitem__(self, *args): return _hdfext.array_byte___getitem__(self, *args)
-    def __setitem__(self, *args): return _hdfext.array_byte___setitem__(self, *args)
-    def cast(self): return _hdfext.array_byte_cast(self)
-    __swig_getmethods__["frompointer"] = lambda x: _hdfext.array_byte_frompointer
-    if _newclass:frompointer = staticmethod(_hdfext.array_byte_frompointer)
+    __del__ = lambda self: None
+
+    def __getitem__(self, index):
+        return _hdfext.array_byte___getitem__(self, index)
+
+    def __setitem__(self, index, value):
+        return _hdfext.array_byte___setitem__(self, index, value)
+
+    def cast(self):
+        return _hdfext.array_byte_cast(self)
+    if _newclass:
+        frompointer = staticmethod(_hdfext.array_byte_frompointer)
+    else:
+        frompointer = _hdfext.array_byte_frompointer
 array_byte_swigregister = _hdfext.array_byte_swigregister
 array_byte_swigregister(array_byte)
 
-def array_byte_frompointer(*args):
-  return _hdfext.array_byte_frompointer(*args)
+def array_byte_frompointer(t):
+    return _hdfext.array_byte_frompointer(t)
 array_byte_frompointer = _hdfext.array_byte_frompointer
 
 class array_int8(_object):
@@ -149,22 +186,33 @@ class array_int8(_object):
     __swig_getmethods__ = {}
     __getattr__ = lambda self, name: _swig_getattr(self, array_int8, name)
     __repr__ = _swig_repr
-    def __init__(self, *args): 
-        this = _hdfext.new_array_int8(*args)
-        try: self.this.append(this)
-        except: self.this = this
+
+    def __init__(self, nelements):
+        this = _hdfext.new_array_int8(nelements)
+        try:
+            self.this.append(this)
+        except __builtin__.Exception:
+            self.this = this
     __swig_destroy__ = _hdfext.delete_array_int8
-    __del__ = lambda self : None;
-    def __getitem__(self, *args): return _hdfext.array_int8___getitem__(self, *args)
-    def __setitem__(self, *args): return _hdfext.array_int8___setitem__(self, *args)
-    def cast(self): return _hdfext.array_int8_cast(self)
-    __swig_getmethods__["frompointer"] = lambda x: _hdfext.array_int8_frompointer
-    if _newclass:frompointer = staticmethod(_hdfext.array_int8_frompointer)
+    __del__ = lambda self: None
+
+    def __getitem__(self, index):
+        return _hdfext.array_int8___getitem__(self, index)
+
+    def __setitem__(self, index, value):
+        return _hdfext.array_int8___setitem__(self, index, value)
+
+    def cast(self):
+        return _hdfext.array_int8_cast(self)
+    if _newclass:
+        frompointer = staticmethod(_hdfext.array_int8_frompointer)
+    else:
+        frompointer = _hdfext.array_int8_frompointer
 array_int8_swigregister = _hdfext.array_int8_swigregister
 array_int8_swigregister(array_int8)
 
-def array_int8_frompointer(*args):
-  return _hdfext.array_int8_frompointer(*args)
+def array_int8_frompointer(t):
+    return _hdfext.array_int8_frompointer(t)
 array_int8_frompointer = _hdfext.array_int8_frompointer
 
 class array_int16(_object):
@@ -173,22 +221,33 @@ class array_int16(_object):
     __swig_getmethods__ = {}
     __getattr__ = lambda self, name: _swig_getattr(self, array_int16, name)
     __repr__ = _swig_repr
-    def __init__(self, *args): 
-        this = _hdfext.new_array_int16(*args)
-        try: self.this.append(this)
-        except: self.this = this
+
+    def __init__(self, nelements):
+        this = _hdfext.new_array_int16(nelements)
+        try:
+            self.this.append(this)
+        except __builtin__.Exception:
+            self.this = this
     __swig_destroy__ = _hdfext.delete_array_int16
-    __del__ = lambda self : None;
-    def __getitem__(self, *args): return _hdfext.array_int16___getitem__(self, *args)
-    def __setitem__(self, *args): return _hdfext.array_int16___setitem__(self, *args)
-    def cast(self): return _hdfext.array_int16_cast(self)
-    __swig_getmethods__["frompointer"] = lambda x: _hdfext.array_int16_frompointer
-    if _newclass:frompointer = staticmethod(_hdfext.array_int16_frompointer)
+    __del__ = lambda self: None
+
+    def __getitem__(self, index):
+        return _hdfext.array_int16___getitem__(self, index)
+
+    def __setitem__(self, index, value):
+        return _hdfext.array_int16___setitem__(self, index, value)
+
+    def cast(self):
+        return _hdfext.array_int16_cast(self)
+    if _newclass:
+        frompointer = staticmethod(_hdfext.array_int16_frompointer)
+    else:
+        frompointer = _hdfext.array_int16_frompointer
 array_int16_swigregister = _hdfext.array_int16_swigregister
 array_int16_swigregister(array_int16)
 
-def array_int16_frompointer(*args):
-  return _hdfext.array_int16_frompointer(*args)
+def array_int16_frompointer(t):
+    return _hdfext.array_int16_frompointer(t)
 array_int16_frompointer = _hdfext.array_int16_frompointer
 
 class array_uint16(_object):
@@ -197,22 +256,33 @@ class array_uint16(_object):
     __swig_getmethods__ = {}
     __getattr__ = lambda self, name: _swig_getattr(self, array_uint16, name)
     __repr__ = _swig_repr
-    def __init__(self, *args): 
-        this = _hdfext.new_array_uint16(*args)
-        try: self.this.append(this)
-        except: self.this = this
+
+    def __init__(self, nelements):
+        this = _hdfext.new_array_uint16(nelements)
+        try:
+            self.this.append(this)
+        except __builtin__.Exception:
+            self.this = this
     __swig_destroy__ = _hdfext.delete_array_uint16
-    __del__ = lambda self : None;
-    def __getitem__(self, *args): return _hdfext.array_uint16___getitem__(self, *args)
-    def __setitem__(self, *args): return _hdfext.array_uint16___setitem__(self, *args)
-    def cast(self): return _hdfext.array_uint16_cast(self)
-    __swig_getmethods__["frompointer"] = lambda x: _hdfext.array_uint16_frompointer
-    if _newclass:frompointer = staticmethod(_hdfext.array_uint16_frompointer)
+    __del__ = lambda self: None
+
+    def __getitem__(self, index):
+        return _hdfext.array_uint16___getitem__(self, index)
+
+    def __setitem__(self, index, value):
+        return _hdfext.array_uint16___setitem__(self, index, value)
+
+    def cast(self):
+        return _hdfext.array_uint16_cast(self)
+    if _newclass:
+        frompointer = staticmethod(_hdfext.array_uint16_frompointer)
+    else:
+        frompointer = _hdfext.array_uint16_frompointer
 array_uint16_swigregister = _hdfext.array_uint16_swigregister
 array_uint16_swigregister(array_uint16)
 
-def array_uint16_frompointer(*args):
-  return _hdfext.array_uint16_frompointer(*args)
+def array_uint16_frompointer(t):
+    return _hdfext.array_uint16_frompointer(t)
 array_uint16_frompointer = _hdfext.array_uint16_frompointer
 
 class array_int32(_object):
@@ -221,22 +291,33 @@ class array_int32(_object):
     __swig_getmethods__ = {}
     __getattr__ = lambda self, name: _swig_getattr(self, array_int32, name)
     __repr__ = _swig_repr
-    def __init__(self, *args): 
-        this = _hdfext.new_array_int32(*args)
-        try: self.this.append(this)
-        except: self.this = this
+
+    def __init__(self, nelements):
+        this = _hdfext.new_array_int32(nelements)
+        try:
+            self.this.append(this)
+        except __builtin__.Exception:
+            self.this = this
     __swig_destroy__ = _hdfext.delete_array_int32
-    __del__ = lambda self : None;
-    def __getitem__(self, *args): return _hdfext.array_int32___getitem__(self, *args)
-    def __setitem__(self, *args): return _hdfext.array_int32___setitem__(self, *args)
-    def cast(self): return _hdfext.array_int32_cast(self)
-    __swig_getmethods__["frompointer"] = lambda x: _hdfext.array_int32_frompointer
-    if _newclass:frompointer = staticmethod(_hdfext.array_int32_frompointer)
+    __del__ = lambda self: None
+
+    def __getitem__(self, index):
+        return _hdfext.array_int32___getitem__(self, index)
+
+    def __setitem__(self, index, value):
+        return _hdfext.array_int32___setitem__(self, index, value)
+
+    def cast(self):
+        return _hdfext.array_int32_cast(self)
+    if _newclass:
+        frompointer = staticmethod(_hdfext.array_int32_frompointer)
+    else:
+        frompointer = _hdfext.array_int32_frompointer
 array_int32_swigregister = _hdfext.array_int32_swigregister
 array_int32_swigregister(array_int32)
 
-def array_int32_frompointer(*args):
-  return _hdfext.array_int32_frompointer(*args)
+def array_int32_frompointer(t):
+    return _hdfext.array_int32_frompointer(t)
 array_int32_frompointer = _hdfext.array_int32_frompointer
 
 class array_uint32(_object):
@@ -245,22 +326,33 @@ class array_uint32(_object):
     __swig_getmethods__ = {}
     __getattr__ = lambda self, name: _swig_getattr(self, array_uint32, name)
     __repr__ = _swig_repr
-    def __init__(self, *args): 
-        this = _hdfext.new_array_uint32(*args)
-        try: self.this.append(this)
-        except: self.this = this
+
+    def __init__(self, nelements):
+        this = _hdfext.new_array_uint32(nelements)
+        try:
+            self.this.append(this)
+        except __builtin__.Exception:
+            self.this = this
     __swig_destroy__ = _hdfext.delete_array_uint32
-    __del__ = lambda self : None;
-    def __getitem__(self, *args): return _hdfext.array_uint32___getitem__(self, *args)
-    def __setitem__(self, *args): return _hdfext.array_uint32___setitem__(self, *args)
-    def cast(self): return _hdfext.array_uint32_cast(self)
-    __swig_getmethods__["frompointer"] = lambda x: _hdfext.array_uint32_frompointer
-    if _newclass:frompointer = staticmethod(_hdfext.array_uint32_frompointer)
+    __del__ = lambda self: None
+
+    def __getitem__(self, index):
+        return _hdfext.array_uint32___getitem__(self, index)
+
+    def __setitem__(self, index, value):
+        return _hdfext.array_uint32___setitem__(self, index, value)
+
+    def cast(self):
+        return _hdfext.array_uint32_cast(self)
+    if _newclass:
+        frompointer = staticmethod(_hdfext.array_uint32_frompointer)
+    else:
+        frompointer = _hdfext.array_uint32_frompointer
 array_uint32_swigregister = _hdfext.array_uint32_swigregister
 array_uint32_swigregister(array_uint32)
 
-def array_uint32_frompointer(*args):
-  return _hdfext.array_uint32_frompointer(*args)
+def array_uint32_frompointer(t):
+    return _hdfext.array_uint32_frompointer(t)
 array_uint32_frompointer = _hdfext.array_uint32_frompointer
 
 class array_float32(_object):
@@ -269,22 +361,33 @@ class array_float32(_object):
     __swig_getmethods__ = {}
     __getattr__ = lambda self, name: _swig_getattr(self, array_float32, name)
     __repr__ = _swig_repr
-    def __init__(self, *args): 
-        this = _hdfext.new_array_float32(*args)
-        try: self.this.append(this)
-        except: self.this = this
+
+    def __init__(self, nelements):
+        this = _hdfext.new_array_float32(nelements)
+        try:
+            self.this.append(this)
+        except __builtin__.Exception:
+            self.this = this
     __swig_destroy__ = _hdfext.delete_array_float32
-    __del__ = lambda self : None;
-    def __getitem__(self, *args): return _hdfext.array_float32___getitem__(self, *args)
-    def __setitem__(self, *args): return _hdfext.array_float32___setitem__(self, *args)
-    def cast(self): return _hdfext.array_float32_cast(self)
-    __swig_getmethods__["frompointer"] = lambda x: _hdfext.array_float32_frompointer
-    if _newclass:frompointer = staticmethod(_hdfext.array_float32_frompointer)
+    __del__ = lambda self: None
+
+    def __getitem__(self, index):
+        return _hdfext.array_float32___getitem__(self, index)
+
+    def __setitem__(self, index, value):
+        return _hdfext.array_float32___setitem__(self, index, value)
+
+    def cast(self):
+        return _hdfext.array_float32_cast(self)
+    if _newclass:
+        frompointer = staticmethod(_hdfext.array_float32_frompointer)
+    else:
+        frompointer = _hdfext.array_float32_frompointer
 array_float32_swigregister = _hdfext.array_float32_swigregister
 array_float32_swigregister(array_float32)
 
-def array_float32_frompointer(*args):
-  return _hdfext.array_float32_frompointer(*args)
+def array_float32_frompointer(t):
+    return _hdfext.array_float32_frompointer(t)
 array_float32_frompointer = _hdfext.array_float32_frompointer
 
 class array_float64(_object):
@@ -293,499 +396,510 @@ class array_float64(_object):
     __swig_getmethods__ = {}
     __getattr__ = lambda self, name: _swig_getattr(self, array_float64, name)
     __repr__ = _swig_repr
-    def __init__(self, *args): 
-        this = _hdfext.new_array_float64(*args)
-        try: self.this.append(this)
-        except: self.this = this
+
+    def __init__(self, nelements):
+        this = _hdfext.new_array_float64(nelements)
+        try:
+            self.this.append(this)
+        except __builtin__.Exception:
+            self.this = this
     __swig_destroy__ = _hdfext.delete_array_float64
-    __del__ = lambda self : None;
-    def __getitem__(self, *args): return _hdfext.array_float64___getitem__(self, *args)
-    def __setitem__(self, *args): return _hdfext.array_float64___setitem__(self, *args)
-    def cast(self): return _hdfext.array_float64_cast(self)
-    __swig_getmethods__["frompointer"] = lambda x: _hdfext.array_float64_frompointer
-    if _newclass:frompointer = staticmethod(_hdfext.array_float64_frompointer)
+    __del__ = lambda self: None
+
+    def __getitem__(self, index):
+        return _hdfext.array_float64___getitem__(self, index)
+
+    def __setitem__(self, index, value):
+        return _hdfext.array_float64___setitem__(self, index, value)
+
+    def cast(self):
+        return _hdfext.array_float64_cast(self)
+    if _newclass:
+        frompointer = staticmethod(_hdfext.array_float64_frompointer)
+    else:
+        frompointer = _hdfext.array_float64_frompointer
 array_float64_swigregister = _hdfext.array_float64_swigregister
 array_float64_swigregister(array_float64)
 
-def array_float64_frompointer(*args):
-  return _hdfext.array_float64_frompointer(*args)
+def array_float64_frompointer(t):
+    return _hdfext.array_float64_frompointer(t)
 array_float64_frompointer = _hdfext.array_float64_frompointer
 
 
-def new_array_voidp(*args):
-  return _hdfext.new_array_voidp(*args)
+def new_array_voidp(nelements):
+    return _hdfext.new_array_voidp(nelements)
 new_array_voidp = _hdfext.new_array_voidp
 
-def delete_array_voidp(*args):
-  return _hdfext.delete_array_voidp(*args)
+def delete_array_voidp(ary):
+    return _hdfext.delete_array_voidp(ary)
 delete_array_voidp = _hdfext.delete_array_voidp
 
-def array_voidp_getitem(*args):
-  return _hdfext.array_voidp_getitem(*args)
+def array_voidp_getitem(ary, index):
+    return _hdfext.array_voidp_getitem(ary, index)
 array_voidp_getitem = _hdfext.array_voidp_getitem
 
-def array_voidp_setitem(*args):
-  return _hdfext.array_voidp_setitem(*args)
+def array_voidp_setitem(ary, index, value):
+    return _hdfext.array_voidp_setitem(ary, index, value)
 array_voidp_setitem = _hdfext.array_voidp_setitem
 
-def Hopen(*args):
-  return _hdfext.Hopen(*args)
+def Hopen(filename, access_mode, num_dds_blocks):
+    return _hdfext.Hopen(filename, access_mode, num_dds_blocks)
 Hopen = _hdfext.Hopen
 
-def Hclose(*args):
-  return _hdfext.Hclose(*args)
+def Hclose(file_id):
+    return _hdfext.Hclose(file_id)
 Hclose = _hdfext.Hclose
 
 def Hgetlibversion():
-  return _hdfext.Hgetlibversion()
+    return _hdfext.Hgetlibversion()
 Hgetlibversion = _hdfext.Hgetlibversion
 
-def Hgetfileversion(*args):
-  return _hdfext.Hgetfileversion(*args)
+def Hgetfileversion(file_id):
+    return _hdfext.Hgetfileversion(file_id)
 Hgetfileversion = _hdfext.Hgetfileversion
 
-def Hishdf(*args):
-  return _hdfext.Hishdf(*args)
+def Hishdf(filename):
+    return _hdfext.Hishdf(filename)
 Hishdf = _hdfext.Hishdf
 
-def HEvalue(*args):
-  return _hdfext.HEvalue(*args)
+def HEvalue(error_stack_offset):
+    return _hdfext.HEvalue(error_stack_offset)
 HEvalue = _hdfext.HEvalue
 
-def HEstring(*args):
-  return _hdfext.HEstring(*args)
+def HEstring(error_code):
+    return _hdfext.HEstring(error_code)
 HEstring = _hdfext.HEstring
 
 def _HEprint():
-  return _hdfext._HEprint()
+    return _hdfext._HEprint()
 _HEprint = _hdfext._HEprint
 
-def _SDreaddata_0(*args):
-  return _hdfext._SDreaddata_0(*args)
+def _SDreaddata_0(sds_id, data_type, start, edges, stride):
+    return _hdfext._SDreaddata_0(sds_id, data_type, start, edges, stride)
 _SDreaddata_0 = _hdfext._SDreaddata_0
 
-def _SDwritedata_0(*args):
-  return _hdfext._SDwritedata_0(*args)
+def _SDwritedata_0(sds_id, data_type, start, edges, data, stride):
+    return _hdfext._SDwritedata_0(sds_id, data_type, start, edges, data, stride)
 _SDwritedata_0 = _hdfext._SDwritedata_0
 
-def SDstart(*args):
-  return _hdfext.SDstart(*args)
+def SDstart(filename, access_mode):
+    return _hdfext.SDstart(filename, access_mode)
 SDstart = _hdfext.SDstart
 
-def SDcreate(*args):
-  return _hdfext.SDcreate(*args)
+def SDcreate(sd_id, sds_name, data_type, rank, dim_sizes):
+    return _hdfext.SDcreate(sd_id, sds_name, data_type, rank, dim_sizes)
 SDcreate = _hdfext.SDcreate
 
-def SDselect(*args):
-  return _hdfext.SDselect(*args)
+def SDselect(sd_id, sds_index):
+    return _hdfext.SDselect(sd_id, sds_index)
 SDselect = _hdfext.SDselect
 
-def SDendaccess(*args):
-  return _hdfext.SDendaccess(*args)
+def SDendaccess(sds_id):
+    return _hdfext.SDendaccess(sds_id)
 SDendaccess = _hdfext.SDendaccess
 
-def SDend(*args):
-  return _hdfext.SDend(*args)
+def SDend(sd_id):
+    return _hdfext.SDend(sd_id)
 SDend = _hdfext.SDend
 
-def SDfileinfo(*args):
-  return _hdfext.SDfileinfo(*args)
+def SDfileinfo(sd_id):
+    return _hdfext.SDfileinfo(sd_id)
 SDfileinfo = _hdfext.SDfileinfo
 
-def SDgetinfo(*args):
-  return _hdfext.SDgetinfo(*args)
+def SDgetinfo(sds_id, buf):
+    return _hdfext.SDgetinfo(sds_id, buf)
 SDgetinfo = _hdfext.SDgetinfo
 
-def SDcheckempty(*args):
-  return _hdfext.SDcheckempty(*args)
+def SDcheckempty(sds_id):
+    return _hdfext.SDcheckempty(sds_id)
 SDcheckempty = _hdfext.SDcheckempty
 
-def SDidtoref(*args):
-  return _hdfext.SDidtoref(*args)
+def SDidtoref(sds_id):
+    return _hdfext.SDidtoref(sds_id)
 SDidtoref = _hdfext.SDidtoref
 
-def SDiscoordvar(*args):
-  return _hdfext.SDiscoordvar(*args)
+def SDiscoordvar(sds_id):
+    return _hdfext.SDiscoordvar(sds_id)
 SDiscoordvar = _hdfext.SDiscoordvar
 
-def SDisrecord(*args):
-  return _hdfext.SDisrecord(*args)
+def SDisrecord(sds_id):
+    return _hdfext.SDisrecord(sds_id)
 SDisrecord = _hdfext.SDisrecord
 
-def SDnametoindex(*args):
-  return _hdfext.SDnametoindex(*args)
+def SDnametoindex(sd_id, sds_name):
+    return _hdfext.SDnametoindex(sd_id, sds_name)
 SDnametoindex = _hdfext.SDnametoindex
 
-def SDreftoindex(*args):
-  return _hdfext.SDreftoindex(*args)
+def SDreftoindex(sd_id, sds_ref):
+    return _hdfext.SDreftoindex(sd_id, sds_ref)
 SDreftoindex = _hdfext.SDreftoindex
 
-def SDdiminfo(*args):
-  return _hdfext.SDdiminfo(*args)
+def SDdiminfo(dim_id):
+    return _hdfext.SDdiminfo(dim_id)
 SDdiminfo = _hdfext.SDdiminfo
 
-def SDgetdimid(*args):
-  return _hdfext.SDgetdimid(*args)
+def SDgetdimid(sds_id, dim_index):
+    return _hdfext.SDgetdimid(sds_id, dim_index)
 SDgetdimid = _hdfext.SDgetdimid
 
-def SDsetdimname(*args):
-  return _hdfext.SDsetdimname(*args)
+def SDsetdimname(dim_id, dim_name):
+    return _hdfext.SDsetdimname(dim_id, dim_name)
 SDsetdimname = _hdfext.SDsetdimname
 
-def SDgetdimscale(*args):
-  return _hdfext.SDgetdimscale(*args)
+def SDgetdimscale(dim_id, buf):
+    return _hdfext.SDgetdimscale(dim_id, buf)
 SDgetdimscale = _hdfext.SDgetdimscale
 
-def SDsetdimscale(*args):
-  return _hdfext.SDsetdimscale(*args)
+def SDsetdimscale(dim_id, n_values, data_type, buf):
+    return _hdfext.SDsetdimscale(dim_id, n_values, data_type, buf)
 SDsetdimscale = _hdfext.SDsetdimscale
 
-def SDattrinfo(*args):
-  return _hdfext.SDattrinfo(*args)
+def SDattrinfo(obj_id, attr_index):
+    return _hdfext.SDattrinfo(obj_id, attr_index)
 SDattrinfo = _hdfext.SDattrinfo
 
-def SDfindattr(*args):
-  return _hdfext.SDfindattr(*args)
+def SDfindattr(obj_id, attr_name):
+    return _hdfext.SDfindattr(obj_id, attr_name)
 SDfindattr = _hdfext.SDfindattr
 
-def SDreadattr(*args):
-  return _hdfext.SDreadattr(*args)
+def SDreadattr(obj_id, attr_index, buf):
+    return _hdfext.SDreadattr(obj_id, attr_index, buf)
 SDreadattr = _hdfext.SDreadattr
 
-def SDsetattr(*args):
-  return _hdfext.SDsetattr(*args)
+def SDsetattr(obj_id, attr_name, data_type, n_values, values):
+    return _hdfext.SDsetattr(obj_id, attr_name, data_type, n_values, values)
 SDsetattr = _hdfext.SDsetattr
 
-def SDgetcal(*args):
-  return _hdfext.SDgetcal(*args)
+def SDgetcal(sds_id):
+    return _hdfext.SDgetcal(sds_id)
 SDgetcal = _hdfext.SDgetcal
 
-def SDgetdatastrs(*args):
-  return _hdfext.SDgetdatastrs(*args)
+def SDgetdatastrs(sds_id, len):
+    return _hdfext.SDgetdatastrs(sds_id, len)
 SDgetdatastrs = _hdfext.SDgetdatastrs
 
-def SDgetdimstrs(*args):
-  return _hdfext.SDgetdimstrs(*args)
+def SDgetdimstrs(sds_id, len):
+    return _hdfext.SDgetdimstrs(sds_id, len)
 SDgetdimstrs = _hdfext.SDgetdimstrs
 
-def SDgetfillvalue(*args):
-  return _hdfext.SDgetfillvalue(*args)
+def SDgetfillvalue(sds_id, buf):
+    return _hdfext.SDgetfillvalue(sds_id, buf)
 SDgetfillvalue = _hdfext.SDgetfillvalue
 
-def SDgetrange(*args):
-  return _hdfext.SDgetrange(*args)
+def SDgetrange(sds_id, buf1, buf2):
+    return _hdfext.SDgetrange(sds_id, buf1, buf2)
 SDgetrange = _hdfext.SDgetrange
 
-def SDsetcal(*args):
-  return _hdfext.SDsetcal(*args)
+def SDsetcal(sds_id, cal, cal_error, offset, offset_err, data_type):
+    return _hdfext.SDsetcal(sds_id, cal, cal_error, offset, offset_err, data_type)
 SDsetcal = _hdfext.SDsetcal
 
-def SDsetdatastrs(*args):
-  return _hdfext.SDsetdatastrs(*args)
+def SDsetdatastrs(sds_id, label, unit, format, coord_system):
+    return _hdfext.SDsetdatastrs(sds_id, label, unit, format, coord_system)
 SDsetdatastrs = _hdfext.SDsetdatastrs
 
-def SDsetdimstrs(*args):
-  return _hdfext.SDsetdimstrs(*args)
+def SDsetdimstrs(sds_id, label, unit, format):
+    return _hdfext.SDsetdimstrs(sds_id, label, unit, format)
 SDsetdimstrs = _hdfext.SDsetdimstrs
 
-def SDsetfillmode(*args):
-  return _hdfext.SDsetfillmode(*args)
+def SDsetfillmode(sd_id, fill_mode):
+    return _hdfext.SDsetfillmode(sd_id, fill_mode)
 SDsetfillmode = _hdfext.SDsetfillmode
 
-def SDsetfillvalue(*args):
-  return _hdfext.SDsetfillvalue(*args)
+def SDsetfillvalue(sds_id, fill_val):
+    return _hdfext.SDsetfillvalue(sds_id, fill_val)
 SDsetfillvalue = _hdfext.SDsetfillvalue
 
-def SDsetrange(*args):
-  return _hdfext.SDsetrange(*args)
+def SDsetrange(sds_id, max, min):
+    return _hdfext.SDsetrange(sds_id, max, min)
 SDsetrange = _hdfext.SDsetrange
 
-def _SDgetcompress(*args):
-  return _hdfext._SDgetcompress(*args)
+def _SDgetcompress(sds_id):
+    return _hdfext._SDgetcompress(sds_id)
 _SDgetcompress = _hdfext._SDgetcompress
 
-def _SDsetcompress(*args):
-  return _hdfext._SDsetcompress(*args)
+def _SDsetcompress(sds_id, comp_type, value, v2):
+    return _hdfext._SDsetcompress(sds_id, comp_type, value, v2)
 _SDsetcompress = _hdfext._SDsetcompress
 
-def SDsetexternalfile(*args):
-  return _hdfext.SDsetexternalfile(*args)
+def SDsetexternalfile(sds_id, filename, offset):
+    return _hdfext.SDsetexternalfile(sds_id, filename, offset)
 SDsetexternalfile = _hdfext.SDsetexternalfile
 
-def Vinitialize(*args):
-  return _hdfext.Vinitialize(*args)
+def Vinitialize(file_id):
+    return _hdfext.Vinitialize(file_id)
 Vinitialize = _hdfext.Vinitialize
 
-def VSattach(*args):
-  return _hdfext.VSattach(*args)
+def VSattach(file_id, vdata_ref, vdata_access_mode):
+    return _hdfext.VSattach(file_id, vdata_ref, vdata_access_mode)
 VSattach = _hdfext.VSattach
 
-def VSdetach(*args):
-  return _hdfext.VSdetach(*args)
+def VSdetach(vdata_id):
+    return _hdfext.VSdetach(vdata_id)
 VSdetach = _hdfext.VSdetach
 
-def Vfinish(*args):
-  return _hdfext.Vfinish(*args)
+def Vfinish(file_id):
+    return _hdfext.Vfinish(file_id)
 Vfinish = _hdfext.Vfinish
 
-def VHstoredata(*args):
-  return _hdfext.VHstoredata(*args)
+def VHstoredata(file_id, fieldname, buf, n_records, data_type, vdata_name, vdata_class):
+    return _hdfext.VHstoredata(file_id, fieldname, buf, n_records, data_type, vdata_name, vdata_class)
 VHstoredata = _hdfext.VHstoredata
 
-def VHstoredatam(*args):
-  return _hdfext.VHstoredatam(*args)
+def VHstoredatam(file_id, fieldname, buf, n_records, data_type, vdata_name, vdata_class, order):
+    return _hdfext.VHstoredatam(file_id, fieldname, buf, n_records, data_type, vdata_name, vdata_class, order)
 VHstoredatam = _hdfext.VHstoredatam
 
-def VSfdefine(*args):
-  return _hdfext.VSfdefine(*args)
+def VSfdefine(vdata_id, fieldname, data_type, order):
+    return _hdfext.VSfdefine(vdata_id, fieldname, data_type, order)
 VSfdefine = _hdfext.VSfdefine
 
-def VSsetfields(*args):
-  return _hdfext.VSsetfields(*args)
+def VSsetfields(vdata_id, fieldname_list):
+    return _hdfext.VSsetfields(vdata_id, fieldname_list)
 VSsetfields = _hdfext.VSsetfields
 
-def VSseek(*args):
-  return _hdfext.VSseek(*args)
+def VSseek(vdata_id, record_index):
+    return _hdfext.VSseek(vdata_id, record_index)
 VSseek = _hdfext.VSseek
 
-def VSread(*args):
-  return _hdfext.VSread(*args)
+def VSread(vdata_id, databuf, n_records, interlace_mode):
+    return _hdfext.VSread(vdata_id, databuf, n_records, interlace_mode)
 VSread = _hdfext.VSread
 
-def VSwrite(*args):
-  return _hdfext.VSwrite(*args)
+def VSwrite(vdata_id, databuf, n_records, interlace_mode):
+    return _hdfext.VSwrite(vdata_id, databuf, n_records, interlace_mode)
 VSwrite = _hdfext.VSwrite
 
-def VSfpack(*args):
-  return _hdfext.VSfpack(*args)
+def VSfpack(vdata_id, action, fields_in_buf, buf, buf_size, n_records, fieldname_list, bufptrs):
+    return _hdfext.VSfpack(vdata_id, action, fields_in_buf, buf, buf_size, n_records, fieldname_list, bufptrs)
 VSfpack = _hdfext.VSfpack
 
-def VSelts(*args):
-  return _hdfext.VSelts(*args)
+def VSelts(vdata_id):
+    return _hdfext.VSelts(vdata_id)
 VSelts = _hdfext.VSelts
 
-def VSgetclass(*args):
-  return _hdfext.VSgetclass(*args)
+def VSgetclass(vdata_id):
+    return _hdfext.VSgetclass(vdata_id)
 VSgetclass = _hdfext.VSgetclass
 
-def VSgetfields(*args):
-  return _hdfext.VSgetfields(*args)
+def VSgetfields(vdata_id):
+    return _hdfext.VSgetfields(vdata_id)
 VSgetfields = _hdfext.VSgetfields
 
-def VSgetinterlace(*args):
-  return _hdfext.VSgetinterlace(*args)
+def VSgetinterlace(vdata_id):
+    return _hdfext.VSgetinterlace(vdata_id)
 VSgetinterlace = _hdfext.VSgetinterlace
 
-def VSgetname(*args):
-  return _hdfext.VSgetname(*args)
+def VSgetname(vdata_id):
+    return _hdfext.VSgetname(vdata_id)
 VSgetname = _hdfext.VSgetname
 
-def VSsizeof(*args):
-  return _hdfext.VSsizeof(*args)
+def VSsizeof(vdata_id, fieldname_list):
+    return _hdfext.VSsizeof(vdata_id, fieldname_list)
 VSsizeof = _hdfext.VSsizeof
 
-def VSinquire(*args):
-  return _hdfext.VSinquire(*args)
+def VSinquire(vdata_id):
+    return _hdfext.VSinquire(vdata_id)
 VSinquire = _hdfext.VSinquire
 
-def VSQuerytag(*args):
-  return _hdfext.VSQuerytag(*args)
+def VSQuerytag(vdata_id):
+    return _hdfext.VSQuerytag(vdata_id)
 VSQuerytag = _hdfext.VSQuerytag
 
-def VSQueryref(*args):
-  return _hdfext.VSQueryref(*args)
+def VSQueryref(vdata_id):
+    return _hdfext.VSQueryref(vdata_id)
 VSQueryref = _hdfext.VSQueryref
 
-def VSfindex(*args):
-  return _hdfext.VSfindex(*args)
+def VSfindex(vdata_id, field_name):
+    return _hdfext.VSfindex(vdata_id, field_name)
 VSfindex = _hdfext.VSfindex
 
-def VSisattr(*args):
-  return _hdfext.VSisattr(*args)
+def VSisattr(vdta_id):
+    return _hdfext.VSisattr(vdta_id)
 VSisattr = _hdfext.VSisattr
 
-def VFnfields(*args):
-  return _hdfext.VFnfields(*args)
+def VFnfields(vdata_id):
+    return _hdfext.VFnfields(vdata_id)
 VFnfields = _hdfext.VFnfields
 
-def VFfieldtype(*args):
-  return _hdfext.VFfieldtype(*args)
+def VFfieldtype(vdata_id, field_index):
+    return _hdfext.VFfieldtype(vdata_id, field_index)
 VFfieldtype = _hdfext.VFfieldtype
 
-def VFfieldname(*args):
-  return _hdfext.VFfieldname(*args)
+def VFfieldname(vdata_id, field_index):
+    return _hdfext.VFfieldname(vdata_id, field_index)
 VFfieldname = _hdfext.VFfieldname
 
-def VFfieldesize(*args):
-  return _hdfext.VFfieldesize(*args)
+def VFfieldesize(vdata_id, field_index):
+    return _hdfext.VFfieldesize(vdata_id, field_index)
 VFfieldesize = _hdfext.VFfieldesize
 
-def VFfieldisize(*args):
-  return _hdfext.VFfieldisize(*args)
+def VFfieldisize(vdata_id, field_index):
+    return _hdfext.VFfieldisize(vdata_id, field_index)
 VFfieldisize = _hdfext.VFfieldisize
 
-def VFfieldorder(*args):
-  return _hdfext.VFfieldorder(*args)
+def VFfieldorder(vdata_id, field_index):
+    return _hdfext.VFfieldorder(vdata_id, field_index)
 VFfieldorder = _hdfext.VFfieldorder
 
-def VSfind(*args):
-  return _hdfext.VSfind(*args)
+def VSfind(file_id, vdata_name):
+    return _hdfext.VSfind(file_id, vdata_name)
 VSfind = _hdfext.VSfind
 
-def VSgetid(*args):
-  return _hdfext.VSgetid(*args)
+def VSgetid(file_id, vdata_ref):
+    return _hdfext.VSgetid(file_id, vdata_ref)
 VSgetid = _hdfext.VSgetid
 
-def VSfexist(*args):
-  return _hdfext.VSfexist(*args)
+def VSfexist(vdata_id, fieldname_list):
+    return _hdfext.VSfexist(vdata_id, fieldname_list)
 VSfexist = _hdfext.VSfexist
 
-def VSsetclass(*args):
-  return _hdfext.VSsetclass(*args)
+def VSsetclass(vdata_id, vdata_class):
+    return _hdfext.VSsetclass(vdata_id, vdata_class)
 VSsetclass = _hdfext.VSsetclass
 
-def VSsetname(*args):
-  return _hdfext.VSsetname(*args)
+def VSsetname(vdata_id, vdata_name):
+    return _hdfext.VSsetname(vdata_id, vdata_name)
 VSsetname = _hdfext.VSsetname
 
-def VSsetinterlace(*args):
-  return _hdfext.VSsetinterlace(*args)
+def VSsetinterlace(vdata_id, interlace_mode):
+    return _hdfext.VSsetinterlace(vdata_id, interlace_mode)
 VSsetinterlace = _hdfext.VSsetinterlace
 
-def VSsetattr(*args):
-  return _hdfext.VSsetattr(*args)
+def VSsetattr(vdata_id, field_index, attr_name, data_type, n_values, values):
+    return _hdfext.VSsetattr(vdata_id, field_index, attr_name, data_type, n_values, values)
 VSsetattr = _hdfext.VSsetattr
 
-def VSgetattr(*args):
-  return _hdfext.VSgetattr(*args)
+def VSgetattr(vdata_id, field_index, attr_index, buf):
+    return _hdfext.VSgetattr(vdata_id, field_index, attr_index, buf)
 VSgetattr = _hdfext.VSgetattr
 
-def VSfnattrs(*args):
-  return _hdfext.VSfnattrs(*args)
+def VSfnattrs(vdata_id, field_index):
+    return _hdfext.VSfnattrs(vdata_id, field_index)
 VSfnattrs = _hdfext.VSfnattrs
 
-def VSnattrs(*args):
-  return _hdfext.VSnattrs(*args)
+def VSnattrs(vdata_id):
+    return _hdfext.VSnattrs(vdata_id)
 VSnattrs = _hdfext.VSnattrs
 
-def VSattrinfo(*args):
-  return _hdfext.VSattrinfo(*args)
+def VSattrinfo(vdata_id, field_index, attr_index):
+    return _hdfext.VSattrinfo(vdata_id, field_index, attr_index)
 VSattrinfo = _hdfext.VSattrinfo
 
-def VSfindattr(*args):
-  return _hdfext.VSfindattr(*args)
+def VSfindattr(vdata_id, field_index, attr_name):
+    return _hdfext.VSfindattr(vdata_id, field_index, attr_name)
 VSfindattr = _hdfext.VSfindattr
 
-def Vattach(*args):
-  return _hdfext.Vattach(*args)
+def Vattach(file_id, vgroup_ref, vg_access_mode):
+    return _hdfext.Vattach(file_id, vgroup_ref, vg_access_mode)
 Vattach = _hdfext.Vattach
 
-def Vdetach(*args):
-  return _hdfext.Vdetach(*args)
+def Vdetach(vgroup_id):
+    return _hdfext.Vdetach(vgroup_id)
 Vdetach = _hdfext.Vdetach
 
-def Vgetname(*args):
-  return _hdfext.Vgetname(*args)
+def Vgetname(vgroup_id):
+    return _hdfext.Vgetname(vgroup_id)
 Vgetname = _hdfext.Vgetname
 
-def Vsetname(*args):
-  return _hdfext.Vsetname(*args)
+def Vsetname(vgroup_id, vgroup_name):
+    return _hdfext.Vsetname(vgroup_id, vgroup_name)
 Vsetname = _hdfext.Vsetname
 
-def Vgetclass(*args):
-  return _hdfext.Vgetclass(*args)
+def Vgetclass(vgroup_id):
+    return _hdfext.Vgetclass(vgroup_id)
 Vgetclass = _hdfext.Vgetclass
 
-def Vsetclass(*args):
-  return _hdfext.Vsetclass(*args)
+def Vsetclass(vgroup_id, vgroup_class):
+    return _hdfext.Vsetclass(vgroup_id, vgroup_class)
 Vsetclass = _hdfext.Vsetclass
 
-def Vfind(*args):
-  return _hdfext.Vfind(*args)
+def Vfind(file_id, vgroup_name):
+    return _hdfext.Vfind(file_id, vgroup_name)
 Vfind = _hdfext.Vfind
 
-def Vfindclass(*args):
-  return _hdfext.Vfindclass(*args)
+def Vfindclass(file_id, vgroup_class):
+    return _hdfext.Vfindclass(file_id, vgroup_class)
 Vfindclass = _hdfext.Vfindclass
 
-def Vinsert(*args):
-  return _hdfext.Vinsert(*args)
+def Vinsert(vgroup_id, v_id):
+    return _hdfext.Vinsert(vgroup_id, v_id)
 Vinsert = _hdfext.Vinsert
 
-def Vaddtagref(*args):
-  return _hdfext.Vaddtagref(*args)
+def Vaddtagref(vgroup_id, obj_tag, obj_ref):
+    return _hdfext.Vaddtagref(vgroup_id, obj_tag, obj_ref)
 Vaddtagref = _hdfext.Vaddtagref
 
-def Vdeletetagref(*args):
-  return _hdfext.Vdeletetagref(*args)
+def Vdeletetagref(vgroup_id, obj_tag, obj_ref):
+    return _hdfext.Vdeletetagref(vgroup_id, obj_tag, obj_ref)
 Vdeletetagref = _hdfext.Vdeletetagref
 
-def Vdelete(*args):
-  return _hdfext.Vdelete(*args)
+def Vdelete(file_id, vgroup_id):
+    return _hdfext.Vdelete(file_id, vgroup_id)
 Vdelete = _hdfext.Vdelete
 
-def VQueryref(*args):
-  return _hdfext.VQueryref(*args)
+def VQueryref(vgroup_id):
+    return _hdfext.VQueryref(vgroup_id)
 VQueryref = _hdfext.VQueryref
 
-def VQuerytag(*args):
-  return _hdfext.VQuerytag(*args)
+def VQuerytag(vgroup_id):
+    return _hdfext.VQuerytag(vgroup_id)
 VQuerytag = _hdfext.VQuerytag
 
-def Vntagrefs(*args):
-  return _hdfext.Vntagrefs(*args)
+def Vntagrefs(vgroup_id):
+    return _hdfext.Vntagrefs(vgroup_id)
 Vntagrefs = _hdfext.Vntagrefs
 
-def Vgettagref(*args):
-  return _hdfext.Vgettagref(*args)
+def Vgettagref(vgroup_id, index):
+    return _hdfext.Vgettagref(vgroup_id, index)
 Vgettagref = _hdfext.Vgettagref
 
-def Vgetversion(*args):
-  return _hdfext.Vgetversion(*args)
+def Vgetversion(vgroup_id):
+    return _hdfext.Vgetversion(vgroup_id)
 Vgetversion = _hdfext.Vgetversion
 
-def Vgettagrefs(*args):
-  return _hdfext.Vgettagrefs(*args)
+def Vgettagrefs(vgroup_id, tag_attay, ref_array, maxsize):
+    return _hdfext.Vgettagrefs(vgroup_id, tag_attay, ref_array, maxsize)
 Vgettagrefs = _hdfext.Vgettagrefs
 
-def Vgetid(*args):
-  return _hdfext.Vgetid(*args)
+def Vgetid(file_id, vgroup_ref):
+    return _hdfext.Vgetid(file_id, vgroup_ref)
 Vgetid = _hdfext.Vgetid
 
-def Vinqtagref(*args):
-  return _hdfext.Vinqtagref(*args)
+def Vinqtagref(vgroup_id, tag, ref):
+    return _hdfext.Vinqtagref(vgroup_id, tag, ref)
 Vinqtagref = _hdfext.Vinqtagref
 
-def Visvg(*args):
-  return _hdfext.Visvg(*args)
+def Visvg(vgroup_id, obj_ref):
+    return _hdfext.Visvg(vgroup_id, obj_ref)
 Visvg = _hdfext.Visvg
 
-def Visvs(*args):
-  return _hdfext.Visvs(*args)
+def Visvs(vgroup_id, obj_ref):
+    return _hdfext.Visvs(vgroup_id, obj_ref)
 Visvs = _hdfext.Visvs
 
-def Vnrefs(*args):
-  return _hdfext.Vnrefs(*args)
+def Vnrefs(vgroup_id, tag_type):
+    return _hdfext.Vnrefs(vgroup_id, tag_type)
 Vnrefs = _hdfext.Vnrefs
 
-def Vfindattr(*args):
-  return _hdfext.Vfindattr(*args)
+def Vfindattr(vgroup_id, attr_name):
+    return _hdfext.Vfindattr(vgroup_id, attr_name)
 Vfindattr = _hdfext.Vfindattr
 
-def Vgetattr(*args):
-  return _hdfext.Vgetattr(*args)
+def Vgetattr(vdata_id, attr_index, buf):
+    return _hdfext.Vgetattr(vdata_id, attr_index, buf)
 Vgetattr = _hdfext.Vgetattr
 
-def Vsetattr(*args):
-  return _hdfext.Vsetattr(*args)
+def Vsetattr(vgroup_id, attr_name, data_type, n_values, values):
+    return _hdfext.Vsetattr(vgroup_id, attr_name, data_type, n_values, values)
 Vsetattr = _hdfext.Vsetattr
 
-def Vattrinfo(*args):
-  return _hdfext.Vattrinfo(*args)
+def Vattrinfo(vgroup_id, attr_index):
+    return _hdfext.Vattrinfo(vgroup_id, attr_index)
 Vattrinfo = _hdfext.Vattrinfo
 
-def Vnattrs(*args):
-  return _hdfext.Vnattrs(*args)
+def Vnattrs(vgroup_id):
+    return _hdfext.Vnattrs(vgroup_id)
 Vnattrs = _hdfext.Vnattrs
 # This file is compatible with both classic and new-style classes.
 


=====================================
pyhdf/hdfext_wrap.c
=====================================
@@ -1,6 +1,6 @@
 /* ----------------------------------------------------------------------------
  * This file was automatically generated by SWIG (http://www.swig.org).
- * Version 3.0.2
+ * Version 3.0.12
  *
  * This file is not intended to be easily readable and contains a number of
  * coding conventions designed to improve portability and efficiency. Do not make
@@ -8,7 +8,11 @@
  * interface file instead.
  * ----------------------------------------------------------------------------- */
 
+
+#ifndef SWIGPYTHON
 #define SWIGPYTHON
+#endif
+
 #define SWIG_PYTHON_DIRECTOR_NO_VTABLE
 
 /* -----------------------------------------------------------------------------
@@ -78,9 +82,11 @@
 #endif
 
 /* exporting methods */
-#if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
-#  ifndef GCC_HASCLASSVISIBILITY
-#    define GCC_HASCLASSVISIBILITY
+#if defined(__GNUC__)
+#  if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
+#    ifndef GCC_HASCLASSVISIBILITY
+#      define GCC_HASCLASSVISIBILITY
+#    endif
 #  endif
 #endif
 
@@ -119,6 +125,19 @@
 # define _SCL_SECURE_NO_DEPRECATE
 #endif
 
+/* Deal with Apple's deprecated 'AssertMacros.h' from Carbon-framework */
+#if defined(__APPLE__) && !defined(__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES)
+# define __ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES 0
+#endif
+
+/* Intel's compiler complains if a variable which was never initialised is
+ * cast to void, which is a common idiom which we use to indicate that we
+ * are aware a variable isn't used.  So we just silence that warning.
+ * See: https://github.com/swig/swig/issues/192 for more discussion.
+ */
+#ifdef __INTEL_COMPILER
+# pragma warning disable 592
+#endif
 
 
 #if defined(_DEBUG) && defined(SWIG_PYTHON_INTERPRETER_NO_DEBUG)
@@ -627,16 +646,16 @@ SWIG_UnpackData(const char *c, void *ptr, size_t sz) {
     char d = *(c++);
     unsigned char uu;
     if ((d >= '0') && (d <= '9'))
-      uu = ((d - '0') << 4);
+      uu = (unsigned char)((d - '0') << 4);
     else if ((d >= 'a') && (d <= 'f'))
-      uu = ((d - ('a'-10)) << 4);
+      uu = (unsigned char)((d - ('a'-10)) << 4);
     else
       return (char *) 0;
     d = *(c++);
     if ((d >= '0') && (d <= '9'))
-      uu |= (d - '0');
+      uu |= (unsigned char)(d - '0');
     else if ((d >= 'a') && (d <= 'f'))
-      uu |= (d - ('a'-10));
+      uu |= (unsigned char)(d - ('a'-10));
     else
       return (char *) 0;
     *u = uu;
@@ -819,10 +838,6 @@ PyString_FromFormat(const char *fmt, ...) {
 }
 #endif
 
-/* Add PyObject_Del for old Pythons */
-#if PY_VERSION_HEX < 0x01060000
-# define PyObject_Del(op) PyMem_DEL((op))
-#endif
 #ifndef PyObject_DEL
 # define PyObject_DEL PyObject_Del
 #endif
@@ -937,6 +952,7 @@ typedef destructor freefunc;
 #if PY_VERSION_HEX < 0x03020000
 #define PyDescr_TYPE(x) (((PyDescrObject *)(x))->d_type)
 #define PyDescr_NAME(x) (((PyDescrObject *)(x))->d_name)
+#define Py_hash_t long
 #endif
 
 /* -----------------------------------------------------------------------------
@@ -1288,7 +1304,7 @@ SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) {
 
 /* Unpack the argument tuple */
 
-SWIGINTERN int
+SWIGINTERN Py_ssize_t
 SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssize_t max, PyObject **objs)
 {
   if (!args) {
@@ -1302,7 +1318,7 @@ SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssi
   }  
   if (!PyTuple_Check(args)) {
     if (min <= 1 && max >= 1) {
-      int i;
+      Py_ssize_t i;
       objs[0] = args;
       for (i = 1; i < max; ++i) {
 	objs[i] = 0;
@@ -1322,7 +1338,7 @@ SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssi
 		   name, (min == max ? "" : "at most "), (int)max, (int)l);
       return 0;
     } else {
-      int i;
+      Py_ssize_t i;
       for (i = 0; i < l; ++i) {
 	objs[i] = PyTuple_GET_ITEM(args, i);
       }
@@ -1508,6 +1524,23 @@ typedef struct {
 #endif
 } SwigPyObject;
 
+
+#ifdef SWIGPYTHON_BUILTIN
+
+SWIGRUNTIME PyObject *
+SwigPyObject_get___dict__(PyObject *v, PyObject *SWIGUNUSEDPARM(args))
+{
+  SwigPyObject *sobj = (SwigPyObject *)v;
+
+  if (!sobj->dict)
+    sobj->dict = PyDict_New();
+
+  Py_INCREF(sobj->dict);
+  return sobj->dict;
+}
+
+#endif
+
 SWIGRUNTIME PyObject *
 SwigPyObject_long(SwigPyObject *v)
 {
@@ -1646,16 +1679,32 @@ SwigPyObject_dealloc(PyObject *v)
     if (destroy) {
       /* destroy is always a VARARGS method */
       PyObject *res;
+
+      /* PyObject_CallFunction() has the potential to silently drop
+         the active active exception.  In cases of unnamed temporary
+         variable or where we just finished iterating over a generator
+         StopIteration will be active right now, and this needs to
+         remain true upon return from SwigPyObject_dealloc.  So save
+         and restore. */
+      
+      PyObject *val = NULL, *type = NULL, *tb = NULL;
+      PyErr_Fetch(&val, &type, &tb);
+
       if (data->delargs) {
-	/* we need to create a temporary object to carry the destroy operation */
-	PyObject *tmp = SwigPyObject_New(sobj->ptr, ty, 0);
-	res = SWIG_Python_CallFunctor(destroy, tmp);
-	Py_DECREF(tmp);
+        /* we need to create a temporary object to carry the destroy operation */
+        PyObject *tmp = SwigPyObject_New(sobj->ptr, ty, 0);
+        res = SWIG_Python_CallFunctor(destroy, tmp);
+        Py_DECREF(tmp);
       } else {
-	PyCFunction meth = PyCFunction_GET_FUNCTION(destroy);
-	PyObject *mself = PyCFunction_GET_SELF(destroy);
-	res = ((*meth)(mself, v));
+        PyCFunction meth = PyCFunction_GET_FUNCTION(destroy);
+        PyObject *mself = PyCFunction_GET_SELF(destroy);
+        res = ((*meth)(mself, v));
       }
+      if (!res)
+        PyErr_WriteUnraisable(destroy);
+
+      PyErr_Restore(val, type, tb);
+
       Py_XDECREF(res);
     } 
 #if !defined(SWIG_PYTHON_SILENT_MEMLEAK)
@@ -1679,6 +1728,7 @@ SwigPyObject_append(PyObject* v, PyObject* next)
   next = tmp;
 #endif
   if (!SwigPyObject_Check(next)) {
+    PyErr_SetString(PyExc_TypeError, "Attempt to append a non SwigPyObject");
     return NULL;
   }
   sobj->next = next;
@@ -1778,7 +1828,7 @@ swigobject_methods[] = {
 static PyMethodDef
 swigobject_methods[] = {
   {(char *)"disown",  (PyCFunction)SwigPyObject_disown,  METH_VARARGS,  (char *)"releases ownership of the pointer"},
-  {(char *)"acquire", (PyCFunction)SwigPyObject_acquire, METH_VARARGS,  (char *)"aquires ownership of the pointer"},
+  {(char *)"acquire", (PyCFunction)SwigPyObject_acquire, METH_VARARGS,  (char *)"acquires ownership of the pointer"},
   {(char *)"own",     (PyCFunction)SwigPyObject_own,     METH_VARARGS,  (char *)"returns/sets ownership of the pointer"},
   {(char *)"append",  (PyCFunction)SwigPyObject_append,  METH_VARARGS,  (char *)"appends another 'this' object"},
   {(char *)"next",    (PyCFunction)SwigPyObject_next,    METH_VARARGS,  (char *)"returns the next 'this' object"},
@@ -1834,7 +1884,9 @@ SwigPyObject_TypeOnce(void) {
     (unaryfunc)SwigPyObject_oct,  /*nb_oct*/
     (unaryfunc)SwigPyObject_hex,  /*nb_hex*/
 #endif
-#if PY_VERSION_HEX >= 0x03000000 /* 3.0 */
+#if PY_VERSION_HEX >= 0x03050000 /* 3.5 */
+    0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_matrix_multiply */
+#elif PY_VERSION_HEX >= 0x03000000 /* 3.0 */
     0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index, nb_inplace_divide removed */
 #elif PY_VERSION_HEX >= 0x02050000 /* 2.5.0 */
     0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index */
@@ -1849,7 +1901,6 @@ SwigPyObject_TypeOnce(void) {
   static int type_init = 0;
   if (!type_init) {
     const PyTypeObject tmp = {
-      /* PyObject header changed in Python 3 */
 #if PY_VERSION_HEX >= 0x03000000
       PyVarObject_HEAD_INIT(NULL, 0)
 #else
@@ -1860,7 +1911,7 @@ SwigPyObject_TypeOnce(void) {
       sizeof(SwigPyObject),                 /* tp_basicsize */
       0,                                    /* tp_itemsize */
       (destructor)SwigPyObject_dealloc,     /* tp_dealloc */
-      0,				    /* tp_print */
+      0,                                    /* tp_print */
 #if PY_VERSION_HEX < 0x02020000
       (getattrfunc)SwigPyObject_getattr,    /* tp_getattr */
 #else
@@ -1868,7 +1919,7 @@ SwigPyObject_TypeOnce(void) {
 #endif
       (setattrfunc)0,                       /* tp_setattr */
 #if PY_VERSION_HEX >= 0x03000000
-    0, /* tp_reserved in 3.0.1, tp_compare in 3.0.0 but not used */
+      0, /* tp_reserved in 3.0.1, tp_compare in 3.0.0 but not used */
 #else
       (cmpfunc)SwigPyObject_compare,        /* tp_compare */
 #endif
@@ -1878,7 +1929,7 @@ SwigPyObject_TypeOnce(void) {
       0,                                    /* tp_as_mapping */
       (hashfunc)0,                          /* tp_hash */
       (ternaryfunc)0,                       /* tp_call */
-      0,				    /* tp_str */
+      0,                                    /* tp_str */
       PyObject_GenericGetAttr,              /* tp_getattro */
       0,                                    /* tp_setattro */
       0,                                    /* tp_as_buffer */
@@ -1914,10 +1965,19 @@ SwigPyObject_TypeOnce(void) {
       0,                                    /* tp_del */
 #endif
 #if PY_VERSION_HEX >= 0x02060000
-      0,                                    /* tp_version */
+      0,                                    /* tp_version_tag */
+#endif
+#if PY_VERSION_HEX >= 0x03040000
+      0,                                    /* tp_finalize */
 #endif
 #ifdef COUNT_ALLOCS
-      0,0,0,0                               /* tp_alloc -> tp_next */
+      0,                                    /* tp_allocs */
+      0,                                    /* tp_frees */
+      0,                                    /* tp_maxalloc */
+#if PY_VERSION_HEX >= 0x02050000
+      0,                                    /* tp_prev */
+#endif
+      0                                     /* tp_next */
 #endif
     };
     swigpyobject_type = tmp;
@@ -2032,7 +2092,6 @@ SwigPyPacked_TypeOnce(void) {
   static int type_init = 0;
   if (!type_init) {
     const PyTypeObject tmp = {
-      /* PyObject header changed in Python 3 */
 #if PY_VERSION_HEX>=0x03000000
       PyVarObject_HEAD_INIT(NULL, 0)
 #else
@@ -2093,10 +2152,19 @@ SwigPyPacked_TypeOnce(void) {
       0,                                    /* tp_del */
 #endif
 #if PY_VERSION_HEX >= 0x02060000
-      0,                                    /* tp_version */
+      0,                                    /* tp_version_tag */
+#endif
+#if PY_VERSION_HEX >= 0x03040000
+      0,                                    /* tp_finalize */
 #endif
 #ifdef COUNT_ALLOCS
-      0,0,0,0                               /* tp_alloc -> tp_next */
+      0,                                    /* tp_allocs */
+      0,                                    /* tp_frees */
+      0,                                    /* tp_maxalloc */
+#if PY_VERSION_HEX >= 0x02050000
+      0,                                    /* tp_prev */
+#endif
+      0                                     /* tp_next */
 #endif
     };
     swigpypacked_type = tmp;
@@ -2547,18 +2615,21 @@ SWIG_Python_NewPointerObj(PyObject *self, void *ptr, swig_type_info *type, int f
 	  newobj = (SwigPyObject *) newobj->next;
         newobj->next = next_self;
         newobj = (SwigPyObject *)next_self;
+#ifdef SWIGPYTHON_BUILTIN
+        newobj->dict = 0;
+#endif
       }
     } else {
       newobj = PyObject_New(SwigPyObject, clientdata->pytype);
+#ifdef SWIGPYTHON_BUILTIN
+      newobj->dict = 0;
+#endif
     }
     if (newobj) {
       newobj->ptr = ptr;
       newobj->ty = type;
       newobj->own = own;
       newobj->next = 0;
-#ifdef SWIGPYTHON_BUILTIN
-      newobj->dict = 0;
-#endif
       return (PyObject*) newobj;
     }
     return SWIG_Py_Void();
@@ -2621,13 +2692,11 @@ PyModule_AddObject(PyObject *m, char *name, PyObject *o)
 {
   PyObject *dict;
   if (!PyModule_Check(m)) {
-    PyErr_SetString(PyExc_TypeError,
-		    "PyModule_AddObject() needs module as first arg");
+    PyErr_SetString(PyExc_TypeError, "PyModule_AddObject() needs module as first arg");
     return SWIG_ERROR;
   }
   if (!o) {
-    PyErr_SetString(PyExc_TypeError,
-		    "PyModule_AddObject() needs non-NULL value");
+    PyErr_SetString(PyExc_TypeError, "PyModule_AddObject() needs non-NULL value");
     return SWIG_ERROR;
   }
   
@@ -2954,7 +3023,7 @@ static swig_module_info swig_module = {swig_types, 19, 0, 0, 0, 0};
 #endif
 #define SWIG_name    "_hdfext"
 
-#define SWIGVERSION 0x030002 
+#define SWIGVERSION 0x030012 
 #define SWIG_VERSION SWIGVERSION
 
 
@@ -2979,9 +3048,11 @@ SWIG_AsVal_double (PyObject *obj, double *val)
   if (PyFloat_Check(obj)) {
     if (val) *val = PyFloat_AsDouble(obj);
     return SWIG_OK;
+#if PY_VERSION_HEX < 0x03000000
   } else if (PyInt_Check(obj)) {
-    if (val) *val = PyInt_AsLong(obj);
+    if (val) *val = (double) PyInt_AsLong(obj);
     return SWIG_OK;
+#endif
   } else if (PyLong_Check(obj)) {
     double v = PyLong_AsDouble(obj);
     if (!PyErr_Occurred()) {
@@ -3073,18 +3144,7 @@ SWIG_AsVal_unsigned_SS_long (PyObject *obj, unsigned long *val)
       return SWIG_OK;
     } else {
       PyErr_Clear();
-#if PY_VERSION_HEX >= 0x03000000
-      {
-        long v = PyLong_AsLong(obj);
-        if (!PyErr_Occurred()) {
-          if (v < 0) {
-            return SWIG_OverflowError;
-          }
-        } else {
-          PyErr_Clear();
-        }
-      }
-#endif
+      return SWIG_OverflowError;
     }
   }
 #ifdef SWIG_PYTHON_CAST_MODE
@@ -3111,17 +3171,84 @@ SWIG_AsVal_unsigned_SS_long (PyObject *obj, unsigned long *val)
 }
 
 
+#include <limits.h>
+#if !defined(SWIG_NO_LLONG_MAX)
+# if !defined(LLONG_MAX) && defined(__GNUC__) && defined (__LONG_LONG_MAX__)
+#   define LLONG_MAX __LONG_LONG_MAX__
+#   define LLONG_MIN (-LLONG_MAX - 1LL)
+#   define ULLONG_MAX (LLONG_MAX * 2ULL + 1ULL)
+# endif
+#endif
+
+
+#if defined(LLONG_MAX) && !defined(SWIG_LONG_LONG_AVAILABLE)
+#  define SWIG_LONG_LONG_AVAILABLE
+#endif
+
+
+#ifdef SWIG_LONG_LONG_AVAILABLE
+SWIGINTERN int
+SWIG_AsVal_unsigned_SS_long_SS_long (PyObject *obj, unsigned long long *val)
+{
+  int res = SWIG_TypeError;
+  if (PyLong_Check(obj)) {
+    unsigned long long v = PyLong_AsUnsignedLongLong(obj);
+    if (!PyErr_Occurred()) {
+      if (val) *val = v;
+      return SWIG_OK;
+    } else {
+      PyErr_Clear();
+      res = SWIG_OverflowError;
+    }
+  } else {
+    unsigned long v;
+    res = SWIG_AsVal_unsigned_SS_long (obj,&v);
+    if (SWIG_IsOK(res)) {
+      if (val) *val = v;
+      return res;
+    }
+  }
+#ifdef SWIG_PYTHON_CAST_MODE
+  {
+    const double mant_max = 1LL << DBL_MANT_DIG;
+    double d;
+    res = SWIG_AsVal_double (obj,&d);
+    if (SWIG_IsOK(res) && !SWIG_CanCastAsInteger(&d, 0, mant_max))
+      return SWIG_OverflowError;
+    if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, 0, mant_max)) {
+      if (val) *val = (unsigned long long)(d);
+      return SWIG_AddCast(res);
+    }
+    res = SWIG_TypeError;
+  }
+#endif
+  return res;
+}
+#endif
+
+
 SWIGINTERNINLINE int
 SWIG_AsVal_size_t (PyObject * obj, size_t *val)
 {
-  unsigned long v;
-  int res = SWIG_AsVal_unsigned_SS_long (obj, val ? &v : 0);
-  if (SWIG_IsOK(res) && val) *val = (size_t)(v);
+  int res = SWIG_TypeError;
+#ifdef SWIG_LONG_LONG_AVAILABLE
+  if (sizeof(size_t) <= sizeof(unsigned long)) {
+#endif
+    unsigned long v;
+    res = SWIG_AsVal_unsigned_SS_long (obj, val ? &v : 0);
+    if (SWIG_IsOK(res) && val) *val = (size_t)(v);
+#ifdef SWIG_LONG_LONG_AVAILABLE
+  } else if (sizeof(size_t) <= sizeof(unsigned long long)) {
+    unsigned long long v;
+    res = SWIG_AsVal_unsigned_SS_long_SS_long (obj, val ? &v : 0);
+    if (SWIG_IsOK(res) && val) *val = (size_t)(v);
+  }
+#endif
   return res;
 }
 
 SWIGINTERN array_byte *new_array_byte(size_t nelements){
-    return (unsigned char *)malloc((nelements)*sizeof(unsigned char));
+    return (unsigned char *)calloc(nelements, sizeof(unsigned char));
   }
 SWIGINTERN void delete_array_byte(array_byte *self){
     free((char*)self);
@@ -3130,14 +3257,14 @@ SWIGINTERN unsigned char array_byte___getitem__(array_byte *self,size_t index){
     return self[index];
   }
 
-  #define SWIG_From_long   PyLong_FromLong 
+  #define SWIG_From_long   PyInt_FromLong 
 
 
 SWIGINTERNINLINE PyObject* 
 SWIG_From_unsigned_SS_long  (unsigned long value)
 {
   return (value > LONG_MAX) ?
-    PyLong_FromUnsignedLong(value) : PyLong_FromLong((long)(value)); 
+    PyLong_FromUnsignedLong(value) : PyInt_FromLong((long)(value));
 }
 
 
@@ -3148,16 +3275,6 @@ SWIG_From_unsigned_SS_char  (unsigned char value)
 }
 
 
-#include <limits.h>
-#if !defined(SWIG_NO_LLONG_MAX)
-# if !defined(LLONG_MAX) && defined(__GNUC__) && defined (__LONG_LONG_MAX__)
-#   define LLONG_MAX __LONG_LONG_MAX__
-#   define LLONG_MIN (-LLONG_MAX - 1LL)
-#   define ULLONG_MAX (LLONG_MAX * 2ULL + 1ULL)
-# endif
-#endif
-
-
 SWIGINTERN int
 SWIG_AsVal_unsigned_SS_char (PyObject * obj, unsigned char *val)
 {
@@ -3186,7 +3303,7 @@ SWIGINTERN array_byte *array_byte_frompointer(unsigned char *t){
 typedef signed char array_int8;
 
 SWIGINTERN array_int8 *new_array_int8(size_t nelements){
-    return (signed char *)malloc((nelements)*sizeof(signed char));
+    return (signed char *)calloc(nelements, sizeof(signed char));
   }
 SWIGINTERN void delete_array_int8(array_int8 *self){
     free((char*)self);
@@ -3205,16 +3322,20 @@ SWIG_From_signed_SS_char  (signed char value)
 SWIGINTERN int
 SWIG_AsVal_long (PyObject *obj, long* val)
 {
+#if PY_VERSION_HEX < 0x03000000
   if (PyInt_Check(obj)) {
     if (val) *val = PyInt_AsLong(obj);
     return SWIG_OK;
-  } else if (PyLong_Check(obj)) {
+  } else
+#endif
+  if (PyLong_Check(obj)) {
     long v = PyLong_AsLong(obj);
     if (!PyErr_Occurred()) {
       if (val) *val = v;
       return SWIG_OK;
     } else {
       PyErr_Clear();
+      return SWIG_OverflowError;
     }
   }
 #ifdef SWIG_PYTHON_CAST_MODE
@@ -3269,7 +3390,7 @@ SWIGINTERN array_int8 *array_int8_frompointer(signed char *t){
 typedef short array_int16;
 
 SWIGINTERN array_int16 *new_array_int16(size_t nelements){
-    return (short *)malloc((nelements)*sizeof(short));
+    return (short *)calloc(nelements, sizeof(short));
   }
 SWIGINTERN void delete_array_int16(array_int16 *self){
     free((char*)self);
@@ -3313,7 +3434,7 @@ SWIGINTERN array_int16 *array_int16_frompointer(short *t){
 typedef unsigned short array_uint16;
 
 SWIGINTERN array_uint16 *new_array_uint16(size_t nelements){
-    return (unsigned short *)malloc((nelements)*sizeof(unsigned short));
+    return (unsigned short *)calloc(nelements, sizeof(unsigned short));
   }
 SWIGINTERN void delete_array_uint16(array_uint16 *self){
     free((char*)self);
@@ -3357,7 +3478,7 @@ SWIGINTERN array_uint16 *array_uint16_frompointer(unsigned short *t){
 typedef int array_int32;
 
 SWIGINTERN array_int32 *new_array_int32(size_t nelements){
-    return (int *)malloc((nelements)*sizeof(int));
+    return (int *)calloc(nelements, sizeof(int));
   }
 SWIGINTERN void delete_array_int32(array_int32 *self){
     free((char*)self);
@@ -3394,7 +3515,7 @@ SWIGINTERN array_int32 *array_int32_frompointer(int *t){
 typedef unsigned int array_uint32;
 
 SWIGINTERN array_uint32 *new_array_uint32(size_t nelements){
-    return (unsigned int *)malloc((nelements)*sizeof(unsigned int));
+    return (unsigned int *)calloc(nelements, sizeof(unsigned int));
   }
 SWIGINTERN void delete_array_uint32(array_uint32 *self){
     free((char*)self);
@@ -3438,7 +3559,7 @@ SWIGINTERN array_uint32 *array_uint32_frompointer(unsigned int *t){
 typedef float array_float32;
 
 SWIGINTERN array_float32 *new_array_float32(size_t nelements){
-    return (float *)malloc((nelements)*sizeof(float));
+    return (float *)calloc(nelements, sizeof(float));
   }
 SWIGINTERN void delete_array_float32(array_float32 *self){
     free((char*)self);
@@ -3459,8 +3580,25 @@ SWIG_From_float  (float value)
 
 /* Getting isfinite working pre C99 across multiple platforms is non-trivial. Users can provide SWIG_isfinite on older platforms. */
 #ifndef SWIG_isfinite
+/* isfinite() is a macro for C99 */
 # if defined(isfinite)
 #  define SWIG_isfinite(X) (isfinite(X))
+# elif defined __cplusplus && __cplusplus >= 201103L
+/* Use a template so that this works whether isfinite() is std::isfinite() or
+ * in the global namespace.  The reality seems to vary between compiler
+ * versions.
+ *
+ * Make sure namespace std exists to avoid compiler warnings.
+ *
+ * extern "C++" is required as this fragment can end up inside an extern "C" { } block
+ */
+namespace std { }
+extern "C++" template<typename T>
+inline int SWIG_isfinite_func(T x) {
+  using namespace std;
+  return isfinite(x);
+}
+#  define SWIG_isfinite(X) (SWIG_isfinite_func(X))
 # elif defined(_MSC_VER)
 #  define SWIG_isfinite(X) (_finite(X))
 # elif defined(__sun) && defined(__SVR4)
@@ -3506,7 +3644,7 @@ SWIGINTERN array_float32 *array_float32_frompointer(float *t){
 typedef double array_float64;
 
 SWIGINTERN array_float64 *new_array_float64(size_t nelements){
-    return (double *)malloc((nelements)*sizeof(double));
+    return (double *)calloc(nelements, sizeof(double));
   }
 SWIGINTERN void delete_array_float64(array_float64 *self){
     free((char*)self);
@@ -3525,7 +3663,7 @@ SWIGINTERN array_float64 *array_float64_frompointer(double *t){
   }
 
   static void * *new_array_voidp(size_t nelements) { 
-    return (void * *)malloc((nelements)*sizeof(void *));
+    return (void * *)calloc(nelements, sizeof(void *));
   }
 
   static void delete_array_voidp(void * *ary) {
@@ -3561,13 +3699,18 @@ SWIGINTERN int
 SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize, int *alloc)
 {
 #if PY_VERSION_HEX>=0x03000000
+#if defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
+  if (PyBytes_Check(obj))
+#else
   if (PyUnicode_Check(obj))
+#endif
 #else  
   if (PyString_Check(obj))
 #endif
   {
     char *cstr; Py_ssize_t len;
 #if PY_VERSION_HEX>=0x03000000
+#if !defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
     if (!alloc && cptr) {
         /* We can't allow converting without allocation, since the internal
            representation of string in Python 3 is UCS-2/UCS-4 but we require
@@ -3576,8 +3719,9 @@ SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize, int *alloc)
         return SWIG_RuntimeError;
     }
     obj = PyUnicode_AsUTF8String(obj);
-    PyBytes_AsStringAndSize(obj, &cstr, &len);
     if(alloc) *alloc = SWIG_NEWOBJ;
+#endif
+    PyBytes_AsStringAndSize(obj, &cstr, &len);
 #else
     PyString_AsStringAndSize(obj, &cstr, &len);
 #endif
@@ -3597,27 +3741,58 @@ SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize, int *alloc)
 #else
 	if (*alloc == SWIG_NEWOBJ) 
 #endif
-	  {
-	    *cptr = (char *)memcpy((char *)malloc((len + 1)*sizeof(char)), cstr, sizeof(char)*(len + 1));
-	    *alloc = SWIG_NEWOBJ;
-	  }
-	else {
+	{
+	  *cptr = (char *)memcpy(malloc((len + 1)*sizeof(char)), cstr, sizeof(char)*(len + 1));
+	  *alloc = SWIG_NEWOBJ;
+	} else {
 	  *cptr = cstr;
 	  *alloc = SWIG_OLDOBJ;
 	}
       } else {
-        #if PY_VERSION_HEX>=0x03000000
-        assert(0); /* Should never reach here in Python 3 */
-        #endif
+#if PY_VERSION_HEX>=0x03000000
+#if defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
+	*cptr = PyBytes_AsString(obj);
+#else
+	assert(0); /* Should never reach here with Unicode strings in Python 3 */
+#endif
+#else
 	*cptr = SWIG_Python_str_AsChar(obj);
+#endif
       }
     }
     if (psize) *psize = len + 1;
-#if PY_VERSION_HEX>=0x03000000
+#if PY_VERSION_HEX>=0x03000000 && !defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
     Py_XDECREF(obj);
 #endif
     return SWIG_OK;
   } else {
+#if defined(SWIG_PYTHON_2_UNICODE)
+#if defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
+#error "Cannot use both SWIG_PYTHON_2_UNICODE and SWIG_PYTHON_STRICT_BYTE_CHAR at once"
+#endif
+#if PY_VERSION_HEX<0x03000000
+    if (PyUnicode_Check(obj)) {
+      char *cstr; Py_ssize_t len;
+      if (!alloc && cptr) {
+        return SWIG_RuntimeError;
+      }
+      obj = PyUnicode_AsUTF8String(obj);
+      if (PyString_AsStringAndSize(obj, &cstr, &len) != -1) {
+        if (cptr) {
+          if (alloc) *alloc = SWIG_NEWOBJ;
+          *cptr = (char *)memcpy(malloc((len + 1)*sizeof(char)), cstr, sizeof(char)*(len + 1));
+        }
+        if (psize) *psize = len + 1;
+
+        Py_XDECREF(obj);
+        return SWIG_OK;
+      } else {
+        Py_XDECREF(obj);
+      }
+    }
+#endif
+#endif
+
     swig_type_info* pchar_descriptor = SWIG_pchar_descriptor();
     if (pchar_descriptor) {
       void* vptr = 0;
@@ -3646,13 +3821,17 @@ SWIG_FromCharPtrAndSize(const char* carray, size_t size)
 	SWIG_InternalNewPointerObj((char *)(carray), pchar_descriptor, 0) : SWIG_Py_Void();
     } else {
 #if PY_VERSION_HEX >= 0x03000000
+#if defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
+      return PyBytes_FromStringAndSize(carray, (Py_ssize_t)(size));
+#else
 #if PY_VERSION_HEX >= 0x03010000
-      return PyUnicode_DecodeUTF8(carray, (int)(size), "surrogateescape");
+      return PyUnicode_DecodeUTF8(carray, (Py_ssize_t)(size), "surrogateescape");
 #else
-      return PyUnicode_FromStringAndSize(carray, (int)(size));
+      return PyUnicode_FromStringAndSize(carray, (Py_ssize_t)(size));
+#endif
 #endif
 #else
-      return PyString_FromStringAndSize(carray, (int)(size));
+      return PyString_FromStringAndSize(carray, (Py_ssize_t)(size));
 #endif
     }
   } else {
@@ -4163,7 +4342,7 @@ fail:
 
 SWIGINTERN PyObject *array_byte_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   PyObject *obj;
-  if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
+  if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
   SWIG_TypeNewClientData(SWIGTYPE_p_array_byte, SWIG_NewClientData(obj));
   return SWIG_Py_Void();
 }
@@ -4327,7 +4506,7 @@ fail:
 
 SWIGINTERN PyObject *array_int8_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   PyObject *obj;
-  if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
+  if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
   SWIG_TypeNewClientData(SWIGTYPE_p_array_int8, SWIG_NewClientData(obj));
   return SWIG_Py_Void();
 }
@@ -4491,7 +4670,7 @@ fail:
 
 SWIGINTERN PyObject *array_int16_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   PyObject *obj;
-  if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
+  if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
   SWIG_TypeNewClientData(SWIGTYPE_p_array_int16, SWIG_NewClientData(obj));
   return SWIG_Py_Void();
 }
@@ -4655,7 +4834,7 @@ fail:
 
 SWIGINTERN PyObject *array_uint16_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   PyObject *obj;
-  if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
+  if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
   SWIG_TypeNewClientData(SWIGTYPE_p_array_uint16, SWIG_NewClientData(obj));
   return SWIG_Py_Void();
 }
@@ -4819,7 +4998,7 @@ fail:
 
 SWIGINTERN PyObject *array_int32_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   PyObject *obj;
-  if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
+  if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
   SWIG_TypeNewClientData(SWIGTYPE_p_array_int32, SWIG_NewClientData(obj));
   return SWIG_Py_Void();
 }
@@ -4983,7 +5162,7 @@ fail:
 
 SWIGINTERN PyObject *array_uint32_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   PyObject *obj;
-  if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
+  if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
   SWIG_TypeNewClientData(SWIGTYPE_p_array_uint32, SWIG_NewClientData(obj));
   return SWIG_Py_Void();
 }
@@ -5147,7 +5326,7 @@ fail:
 
 SWIGINTERN PyObject *array_float32_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   PyObject *obj;
-  if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
+  if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
   SWIG_TypeNewClientData(SWIGTYPE_p_array_float32, SWIG_NewClientData(obj));
   return SWIG_Py_Void();
 }
@@ -5311,7 +5490,7 @@ fail:
 
 SWIGINTERN PyObject *array_float64_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   PyObject *obj;
-  if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
+  if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
   SWIG_TypeNewClientData(SWIGTYPE_p_array_float64, SWIG_NewClientData(obj));
   return SWIG_Py_Void();
 }
@@ -10181,7 +10360,7 @@ SWIGRUNTIME void
 SWIG_InitializeModule(void *clientdata) {
   size_t i;
   swig_module_info *module_head, *iter;
-  int found, init;
+  int init;
   
   /* check to see if the circular list has been setup, if not, set it up */
   if (swig_module.next==0) {
@@ -10200,22 +10379,18 @@ SWIG_InitializeModule(void *clientdata) {
     /* This is the first module loaded for this interpreter */
     /* so set the swig module into the interpreter */
     SWIG_SetModule(clientdata, &swig_module);
-    module_head = &swig_module;
   } else {
     /* the interpreter has loaded a SWIG module, but has it loaded this one? */
-    found=0;
     iter=module_head;
     do {
       if (iter==&swig_module) {
-        found=1;
-        break;
+        /* Our module is already in the list, so there's nothing more to do. */
+        return;
       }
       iter=iter->next;
     } while (iter!= module_head);
     
-    /* if the is found in the list, then all is done and we may leave */
-    if (found) return;
-    /* otherwise we must add out module into the list */
+    /* otherwise we must add our module into the list */
     swig_module.next = module_head->next;
     module_head->next = &swig_module;
   }
@@ -10496,7 +10671,6 @@ extern "C" {
     static int type_init = 0;
     if (!type_init) {
       const PyTypeObject tmp = {
-        /* PyObject header changed in Python 3 */
 #if PY_VERSION_HEX >= 0x03000000
         PyVarObject_HEAD_INIT(NULL, 0)
 #else
@@ -10534,10 +10708,19 @@ extern "C" {
         0,                                  /* tp_del */
 #endif
 #if PY_VERSION_HEX >= 0x02060000
-        0,                                  /* tp_version */
+        0,                                  /* tp_version_tag */
+#endif
+#if PY_VERSION_HEX >= 0x03040000
+        0,                                  /* tp_finalize */
 #endif
 #ifdef COUNT_ALLOCS
-        0,0,0,0                             /* tp_alloc -> tp_next */
+        0,                                  /* tp_allocs */
+        0,                                  /* tp_frees */
+        0,                                  /* tp_maxalloc */
+#if PY_VERSION_HEX >= 0x02050000
+        0,                                  /* tp_prev */
+#endif
+        0                                   /* tp_next */
 #endif
       };
       varlink_type = tmp;
@@ -10626,7 +10809,9 @@ extern "C" {
     size_t i;
     for (i = 0; methods[i].ml_name; ++i) {
       const char *c = methods[i].ml_doc;
-      if (c && (c = strstr(c, "swig_ptr: "))) {
+      if (!c) continue;
+      c = strstr(c, "swig_ptr: ");
+      if (c) {
         int j;
         swig_const_info *ci = 0;
         const char *name = c + 10;
@@ -10717,17 +10902,18 @@ SWIG_init(void) {
   static PyGetSetDef thisown_getset_def = {
     (char *)"thisown", SwigPyBuiltin_GetterClosure, SwigPyBuiltin_SetterClosure, NULL, &thisown_getset_closure
   };
-  PyObject *metatype_args;
   PyTypeObject *builtin_pytype;
   int builtin_base_count;
   swig_type_info *builtin_basetype;
   PyObject *tuple;
   PyGetSetDescrObject *static_getset;
   PyTypeObject *metatype;
+  PyTypeObject *swigpyobject;
   SwigPyClientData *cd;
   PyObject *public_interface, *public_symbol;
   PyObject *this_descr;
   PyObject *thisown_descr;
+  PyObject *self = 0;
   int i;
   
   (void)builtin_pytype;
@@ -10735,15 +10921,11 @@ SWIG_init(void) {
   (void)builtin_basetype;
   (void)tuple;
   (void)static_getset;
+  (void)self;
   
-  /* metatype is used to implement static member variables. */
-  metatype_args = Py_BuildValue("(s(O){})", "SwigPyObjectType", &PyType_Type);
-  assert(metatype_args);
-  metatype = (PyTypeObject *) PyType_Type.tp_call((PyObject *) &PyType_Type, metatype_args, NULL);
+  /* Metaclass is used to implement static member variables */
+  metatype = SwigPyObjectType();
   assert(metatype);
-  Py_DECREF(metatype_args);
-  metatype->tp_setattro = (setattrofunc) &SwigPyObjectType_setattro;
-  assert(PyType_Ready(metatype) >= 0);
 #endif
   
   /* Fix SwigMethods to carry the callback ptrs when needed */
@@ -10754,19 +10936,22 @@ SWIG_init(void) {
 #else
   m = Py_InitModule((char *) SWIG_name, SwigMethods);
 #endif
+  
   md = d = PyModule_GetDict(m);
   (void)md;
   
   SWIG_InitializeModule(0);
   
 #ifdef SWIGPYTHON_BUILTIN
+  swigpyobject = SwigPyObject_TypeOnce();
+  
   SwigPyObject_stype = SWIG_MangledTypeQuery("_p_SwigPyObject");
   assert(SwigPyObject_stype);
   cd = (SwigPyClientData*) SwigPyObject_stype->clientdata;
   if (!cd) {
     SwigPyObject_stype->clientdata = &SwigPyObject_clientdata;
-    SwigPyObject_clientdata.pytype = SwigPyObject_TypeOnce();
-  } else if (SwigPyObject_TypeOnce()->tp_basicsize != cd->pytype->tp_basicsize) {
+    SwigPyObject_clientdata.pytype = swigpyobject;
+  } else if (swigpyobject->tp_basicsize != cd->pytype->tp_basicsize) {
     PyErr_SetString(PyExc_RuntimeError, "Import error: attempted to load two incompatible swig-generated modules.");
 # if PY_VERSION_HEX >= 0x03000000
     return NULL;


=====================================
pyhdf/test_SD.py
=====================================
@@ -5,6 +5,7 @@ import os
 import pyhdf.SD
 import tempfile
 from nose.tools import eq_
+from numpy.testing import assert_array_equal
 from pyhdf.SD import SDC
 
 def test_long_varname():
@@ -28,3 +29,31 @@ def test_long_varname():
         eq_(sds_name, name)
     finally:
         os.unlink(path)
+
+def test_negative_int8():
+    _, path = tempfile.mkstemp(suffix='.hdf', prefix='pyhdf_')
+    try:
+        sd = pyhdf.SD.SD(path, SDC.WRITE|SDC.CREATE|SDC.TRUNC)
+        data = np.zeros(shape=(20,20), dtype=np.int8)
+        sds = sd.create("testsds", SDC.INT8, data.shape)
+        sds.setfillvalue(-1)
+        eq_(sds.getfillvalue(), -1)
+
+        sds.setrange(-50, -30)
+        min, max = sds.getrange()
+        eq_(min, -50)
+        eq_(max, -30)
+
+        attr = sds.attr("testattr")
+        attr.set(SDC.INT8, -1)
+        eq_(attr.get(), -1)
+
+        dim = sds.dim(0)
+        scale = [-1]*20
+        dim.setscale(SDC.INT8, scale)
+        assert_array_equal(dim.getscale(), scale)
+
+        sds[:,:] = -40
+        sd.end()
+    finally:
+        os.unlink(path)


=====================================
setup.py
=====================================
@@ -27,6 +27,7 @@ from numpy.distutils.core import setup, Extension
 import sys
 import os
 import os.path as path
+import shlex
 
 CLASSIFIERS = """\
 Development Status :: 5 - Production/Stable
@@ -57,11 +58,29 @@ def _find_args(pat, env):
         pass
     return val
 
+# A Debian based linux distribution might be using libhdf4 (contains netcdf
+# routines) or libhdf4-alt (does not contain netcdf routines). This function
+# tries to detect if the alt version should be used.
+def _use_hdf4alt(libdirs):
+    if not sys.platform.startswith("linux"):
+        return False
+    libdirs.extend(os.environ.get("LD_LIBRARY_PATH", "").split(os.pathsep))
+    libdirs.append("/usr/lib")
+    libdirs.append("/usr/local/lib")
+    libdirs.append("/lib")
+    for d in libdirs:
+        if os.path.exists(os.path.join(d, "libdfalt.so")) and \
+           os.path.exists(os.path.join(d, "libmfhdfalt.so")):
+            return True
+    return False
+
 include_dirs = _find_args('-i', 'INCLUDE_DIRS')
 library_dirs = _find_args('-l', 'LIBRARY_DIRS')
 szip_installed = 'SZIP' in os.environ
 compress = 'NO_COMPRESS' not in os.environ
-extra_link_args = os.environ.get('LINK_ARGS', '')
+extra_link_args = None
+if "LINK_ARGS" in os.environ:
+    extra_link_args = shlex.split(os.environ["LINK_ARGS"])
 
 
 msg = 'Cannot proceed without the HDF4 library.  Please ' \
@@ -124,6 +143,8 @@ if sys.platform == 'win32':
 
 if sys.platform == 'win32':
     libraries = ["hm423m", "hd423m", "xdr_for_dll" ]
+elif _use_hdf4alt(library_dirs):
+    libraries = ["mfhdfalt", "dfalt"]
 else:
     libraries = ["mfhdf", "df"]
 
@@ -148,7 +169,7 @@ _hdfext = Extension('pyhdf._hdfext',
                     include_dirs = include_dirs,
                     extra_compile_args = extra_compile_args,
                     library_dirs = library_dirs,
-                    extra_link_args=[extra_link_args],
+                    extra_link_args=extra_link_args,
                     libraries = libraries,
                     )
 
@@ -166,7 +187,7 @@ setup(name         = 'python-hdf4',
       license      = 'MIT',
       long_description = "\n".join(DOCLINES[2:]),
       url          = 'https://github.com/fhs/python-hdf4',
-      version      = '0.9.1',
+      version      = '0.9.2',
       packages     = ['pyhdf'],
       ext_modules  = [_hdfext],
       data_files   = data_files,



View it on GitLab: https://salsa.debian.org/debian-gis-team/python-hdf4/commit/e9aae2c632c9b8161c13f12d72a40e790eff8100

-- 
View it on GitLab: https://salsa.debian.org/debian-gis-team/python-hdf4/commit/e9aae2c632c9b8161c13f12d72a40e790eff8100
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-grass-devel/attachments/20190220/603156ce/attachment-0001.html>


More information about the Pkg-grass-devel mailing list