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

Antonio Valentino gitlab at salsa.debian.org
Wed Jul 10 06:54:35 BST 2019



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


Commits:
38b21069 by Antonio Valentino at 2019-07-10T05:42:17Z
New upstream version 0.10.1
- - - - -


29 changed files:

- + .appveyor.yml
- .gitignore
- .travis.yml
- + .travis/install_osx_miniconda.bash
- AUTHORS
- − CHANGES
- LICENSE
- − MANIFEST
- + MANIFEST.in
- + Makefile
- + README.md
- − README.rst
- − README_pyhdf
- doc/Makefile
- doc/conf.py
- doc/index.rst
- doc/install.rst
- doc/make.bat
- examples/compress/test-compress.py
- + examples/runall.py
- − private-info
- pyhdf/HDF.py
- pyhdf/Makefile
- pyhdf/SD.py
- pyhdf/V.py
- pyhdf/VS.py
- pyhdf/test_SD.py
- − runexamples.sh
- setup.py


Changes:

=====================================
.appveyor.yml
=====================================
@@ -0,0 +1,46 @@
+# Based on https://packaging.python.org/guides/supporting-windows-using-appveyor/
+# and https://github.com/Anaconda-Platform/anaconda-project/blob/master/appveyor.yml
+
+environment:
+  matrix:
+    # For Miniconda versions available on Appveyor, see
+    # https://www.appveyor.com/docs/windows-images-software/#miniconda
+    - MINICONDA: C:\Miniconda
+    - MINICONDA: C:\Miniconda-x64
+    - MINICONDA: C:\Miniconda3
+    - MINICONDA: C:\Miniconda3-x64
+
+install:
+  # conda 4.5.11 seems to expect that this directory exists already
+  - mkdir C:\Users\appveyor\.conda
+  - call %MINICONDA%\Scripts\activate.bat
+  # The safety checks are simply intended to ensure that there is enough disk space
+  # and the user has the necessary permissions to make environment changes. In a CI
+  # environment these are not necessary and slow things down noticeably on Windows.
+  - conda config --set always_yes yes --set changeps1 no --set auto_update_conda no --set safety_checks disabled
+  - conda install -q conda numpy hdf4 nose
+  - conda info -a
+  # We need wheel installed to build wheels
+  - pip install wheel
+
+build: off
+
+test_script:
+  # Put your test command here.
+  - set LIBRARY_DIRS=%MINICONDA%\Library\bin;%MINICONDA%\Library\lib
+  - set INCLUDE_DIRS=%MINICONDA%\Library\include
+  - python setup.py nosetests -v
+  - python examples\runall.py
+
+after_test:
+  # This step builds your wheels.
+  - python setup.py bdist_wheel
+
+artifacts:
+  # bdist_wheel puts your built wheel in the dist directory
+  - path: dist\*
+
+#on_success:
+#  You can use this step to upload your artifacts to a public website.
+#  See Appveyor's documentation for more details. Or you can simply
+#  access your wheels from the Appveyor "artifacts" tab for your build.


=====================================
.gitignore
=====================================
@@ -1,7 +1,7 @@
 *.pyc
 build/
 dist/
-python_hdf4.egg-info/
+pyhdf.egg-info/
 doc/_build/
 pyhdf/_hdfext*.so
 examples/*/*.hdf


=====================================
.travis.yml
=====================================
@@ -1,16 +1,39 @@
 language: python
-python:
-  - "2.6"
-  - "2.7"
-  - "3.2"
-  - "3.3"
-  - "3.4"
-# command to install dependencies
-install: "sudo apt-get install libhdf4-dev"
+
+matrix:
+  include:
+    - os: linux
+      python: "2.6"
+    - os: linux
+      python: "2.7"
+    - os: linux
+      python: "3.3"
+    - os: linux
+      python: "3.4"
+    - os: linux
+      python: "3.5"
+    - os: linux
+      python: "3.6"
+    - os: osx
+      language: generic
+      env: PYHDF_PYTHON_VERSION="2.7"
+    - os: osx
+      language: generic
+      env: PYHDF_PYTHON_VERSION="3.7"
+
+addons:
+  apt:
+    packages:
+      - libhdf4-dev
+
+before_install:
+  - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then source ./.travis/install_osx_miniconda.bash; fi
+
 # command to run tests
 script:
-  - ./runexamples.sh
-  - nosetests -v
+  - python setup.py nosetests -v
+  - python examples/runall.py
+
 notifications:
   email:
     recipients:


=====================================
.travis/install_osx_miniconda.bash
=====================================
@@ -0,0 +1,22 @@
+#!/bin/bash
+
+# We do this conditionally because it saves us some downloading if the
+# version is the same.
+if [[ "$PYHDF_PYTHON_VERSION" == "2.7" ]]; then
+	curl https://repo.anaconda.com/miniconda/Miniconda2-latest-MacOSX-x86_64.sh > miniconda.sh;
+else
+	curl https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-x86_64.sh > miniconda.sh;
+fi
+bash miniconda.sh -b -p $HOME/miniconda
+export PATH="$HOME/miniconda/bin:$PATH"
+hash -r
+conda config --set always_yes yes --set changeps1 no
+conda update -q conda
+# Useful for debugging any issues with conda
+conda info -a
+
+conda create -q -n test-environment python=$PYHDF_PYTHON_VERSION numpy hdf4 nose
+source activate test-environment
+
+export LIBRARY_DIRS=$CONDA_PREFIX/lib
+export INCLUDE_DIRS=$CONDA_PREFIX/include


=====================================
AUTHORS
=====================================
@@ -1,4 +1,7 @@
-bmagill1250 <Snake$1986Friend>
 Andre Gosselin <Andre.Gosselin at dfo-mpo.gc.ca>
+ at bmagill1250
+ at dmarth
 Fazlul Shahriar <fshahriar at gmail.com>
+HDF-EOS Tools Informatoin Center <eoshelp at hdfgroup.org>
+H. Joe Lee <hyoklee at hdfgroup.org>
 Travis E. Oliphant <teoliphant at gmail.com>


=====================================
CHANGES deleted
=====================================
@@ -1,148 +0,0 @@
-# $Id: CHANGES,v 1.9 2008-08-05 00:20:43 gosselin_a Exp $
-# $Log: not supported by cvs2svn $
-# Revision 1.8  2008/06/30 02:41:44  gosselin_a
-# Preleminary check-in of changes leading to the 0.8 revision.
-#   - switch to numpy, Numeric now unsupported
-#   - better documentation of the compression features
-#   - some bug fixes
-#
-# Revision 1.7  2005/07/14 01:36:40  gosselin_a
-# pyhdf-0.7-3
-# Ported to HDF4.2r1.
-# Support for SZIP compression on SDS datasets.
-# All classes are now 'new-style' classes, deriving from 'object'.
-# Update documentation.
-#
-# Revision 1.6  2004/08/02 17:04:38  gosselin
-# pyhdf-0.7-2
-#
-# Revision 1.4  2004/08/02 15:29:52  gosselin
-# pyhdf-0.7-1
-#
-# Revision 1.3  2004/08/02 15:16:38  gosselin
-# pyhdf 0.6-1
-#
-# Revision 1.2  2004/08/02 15:05:39  gosselin
-# pyhdf-0.5.2
-#
-# Revision 1.1  2004/08/02 14:45:56  gosselin
-# Initial revision
-#
-
-List of changes to 'pyhdf' since the initial release.
-
-pyhdf-0.8-3
------------
-  October 2, 2008
-    - Regenerated the SWIG files with SWIG 1.3.33 in order to work correctly on
-      some 64-bit systems.
-    - Fixed HDF4Error to properly handle its arguments.
-    - Use the full HDF4 headers in the extension module so as not to rely on
-      implicit declarations. This appears to fix some bugs on 64-bit platforms.
-
-pyhdf-0.8-2
------------
-  August 18, 2008
-    - Removed ODL parser including examples and aster examples.  These are now
-       in scikits.rsformats.
-
-pyhdf-0.8-1
------------
-  August 4 2008
-    - Numeric replaced with NumPy as underlying numerical package.
-      Support for the now phased out 'Numeric' package has been dropped.
-    - Parser for ODL (Object Description Language) added
-      (courtesy of Enthought Inc).
-    - The swig interface file is now part of the distribution.
-    - Fixed bug in the 'setscale()' method of an SDim instance.
-    - Users working with a debian-based linux distro reported problems with
-      the HDF SDgetcompress() / SDsetcompress() compression-related functions.
-      The cause seems to be related to the use of an HDF library whose version
-      predates 4.2r1. Debian appears very slow moving to the most 
-      recent HDF release. To avoid depriving debian users of the use of pyhdf,
-      macro 'NOCOMPRESS' can be set inside 'setup.py'. This will transform
-      functions SDsetcompress() and SDgetcompress() into no-ops which 
-      will return -1 (HDF error code) if called.
-    - Examples of the use of the HDF compression functionnalities have been 
-      completely reworked.  See directory 'examples/compress' for details.
-
-
-pyhdf-0.7-3
------------
-  July 13 2005
-    Interim release.
-      - The main motivation for this release is to benefit from HDF-4.2r1 bug fixes and 
-        optionally the SZIP compression method allowed by HDF4.2 on SDS datasets.
-      - To use this release, you need to install HDF4.2r1. It will *NOT* work over
-        HDF4.1. To compress datasets using SZIP, szip 2.0 library must also be installed,
-        and your HDF installation must have been compiled with the szip option enabled.
-      - Conversely, pyhdf versions preceeding 0.7-3 will *NOT* work over HDF4.2. 
-        Only pyhdf-0.7-3 will work with HDF4.2.
-      - Added new compression type SDC.COMP_SZIP, and defined new constants SDC.COMP_SZIP_EC
-        and SDC.COMP_SZIP_NN to configure the behavior of SZIP.
-      - Updated methods SDS.sdsetcompress() and SDS.getcompress() to allow compression using 
-        SZIP compression, and inquire about SZIP compression configuration.
-      - All classes are now of "new-style" type (eg they derive from calss 'object').
-      - Updated documentation.
-
-pyhdf-0.7-2
------------
-  June 9 2004
-    Bug fix release.
-    - Do not strip trailing NULL at end of string attributes.
-    - Single-valued attributes were incorrectly processed in the set()
-      method of the SDAttr class.
-    - The following feature was not correctly documented.
-      When attributes are accessed using the "dot" notation, it is important
-      to be able to differentiate between true python attributes and 
-      HDF attributes. For ex., if 'sds' is an HDF SD instance and one writes
-      'sds.x = "abcd" ', should attribute 'x' be considered as an HDF attribute and
-      its value written in the HDF file, or as a python attribute and stored in the
-      'sds' object dictionnary ?
-
-      To solve that problem, an attribute is considered a python attribute if it
-      starts with an '_', and as an HDF attribute otherwise. Note that this only
-      applies when using the "dot" notation (or the getattr()/setattr() equivalent
-      functions). If one needs to define an HDF attribute whose name starts with a
-      '_' (eg: '_FillValue'), allocate an SDAttr instance and use its get()/set()
-      methods.
-
-      Ex.:
-        sds = SD('myfile.hdf').select('mydataset')
-        sds._FillValue = -999   # wrong: _FillValue not stored in the HDF dataset
-        sds.attr('_FillValue').set(SDC.FLOAT32, -999.0) # good!
-
-pyhdf-0.7-1
------------
-  December 16 2003
-    - Implementation of the V (vgroup) API.
-
-pyhdf-0.6-1
------------
-  December 3 2003
-    -Implementation of the VS (vdata) API.
-    -Added support for unsigned integer types UINT16 and UINT32 inside
-     the SD API. Version 22 of Numeric must however be installed
-     (see comments inside `setup.py' for a way to remove support for
-     unsigned integers and compile with a lower version number of Numeric).
-    -Improved documentation.
-    -Bug fixes (thanks to Richard.Andrews at esands.com)
-
-pyhdf-0.5-2
------------
-  August 3 2003
-    -After starting the implementation of another HDF API, it
-     was found that the idea of having on C extension module
-     per HDF API was not a good one. It made difficult the sharing
-     of HDF data structures between the C extension modules.
-     It was thus decided to have just one C extension module
-     shared between all the python modules.
-    -The new C extension module is named "_hdfext". The SD python 
-     module has been modified to import "_hdfext" instead of "_sdext".
-    -A new "error" module has been added.
-
-pyhdf-0.5-1
------------
-  July 31 2003
-    -Initial release.
-


=====================================
LICENSE
=====================================
@@ -1,6 +1,6 @@
 The MIT License (MIT)
 
-Copyright (c) 2014 The Python-HDF4 Authors
+Copyright (c) 2019 The pyhdf Authors
 
 Permission is hereby granted, free of charge, to any person obtaining a copy
 of this software and associated documentation files (the "Software"), to deal


=====================================
MANIFEST deleted
=====================================
@@ -1,40 +0,0 @@
-CHANGES
-doc/pyhdf.HDF.html
-doc/pyhdf.HDF.txt
-doc/pyhdf.SD.html
-doc/pyhdf.SD.txt
-doc/pyhdf.V.html
-doc/pyhdf.V.txt
-doc/pyhdf.VS.html
-doc/pyhdf.VS.txt
-examples/compress/README_compress.txt
-examples/compress/test-compress.py
-examples/hdfstruct/hdfstruct.py
-examples/hdfstruct/README_hdfstruct.txt
-examples/inventory/inventory_1-1.py
-examples/inventory/inventory_1-2.py
-examples/inventory/inventory_1-3.py
-examples/inventory/inventory_1-4.py
-examples/inventory/inventory_1-5.py
-examples/inventory/README_inventory.txt
-examples/txttohdf/depth.txt
-examples/txttohdf/README_txttohdf.txt
-examples/txttohdf/temp.txt
-examples/txttohdf/txttohdf.py
-examples/vgroup/README_vgroup.txt
-examples/vgroup/vgread.py
-examples/vgroup/vgwrite.py
-INSTALL
-pyhdf/__init__.py
-pyhdf/error.py
-pyhdf/hdfext.i
-pyhdf/hdfext.py
-pyhdf/hdfext_wrap.c
-pyhdf/HC.py
-pyhdf/HDF.py
-pyhdf/SD.py
-pyhdf/VS.py
-pyhdf/V.py
-README
-setup.cfg
-setup.py


=====================================
MANIFEST.in
=====================================
@@ -0,0 +1,7 @@
+include README.md
+include LICENSE
+include AUTHORS
+include pyhdf/hdfext.i
+recursive-include examples *
+recursive-include doc *
+prune doc/_build


=====================================
Makefile
=====================================
@@ -0,0 +1,37 @@
+PYTHON = python
+
+.PHONY: all
+all: build
+
+.PHONY: build
+build:
+	make -C pyhdf build
+	$(PYTHON) setup.py build
+
+.PHONY: install
+install: build
+	$(PYTHON) setup.py install
+
+.PHONY: builddoc
+.ONESHELL:
+builddoc:
+	export PYTHONPATH=$(shell pwd)
+	$(PYTHON) setup.py build_ext --inplace
+	make -C doc clean
+	make -C doc html
+	@echo
+	@echo doc index is doc/_build/html/index.html
+
+.PHONY: clean
+clean:
+	rm -rf build/ dist/ pyhdf.egg-info examples/*/*.hdf
+	make -C pyhdf clean
+	make -C doc clean
+
+.PHONY: dist
+dist:
+	$(PYTHON) setup.py sdist
+	@echo Upload to test site:
+	@echo $(PYTHON) -m twine upload --repository-url https://test.pypi.org/legacy/ dist/*
+	@echo Upload to PyPI:
+	@echo $(PYTHON) -m twine upload dist/*


=====================================
README.md
=====================================
@@ -0,0 +1,40 @@
+[![Build Status](https://travis-ci.org/fhs/pyhdf.svg?branch=master)](https://travis-ci.org/fhs/pyhdf)
+[![Build status](https://ci.appveyor.com/api/projects/status/4a8pf8vo8nrjgxol/branch/master?svg=true)](https://ci.appveyor.com/project/fhs/pyhdf/branch/master)
+[![Anaconda-Server Badge](https://anaconda.org/conda-forge/pyhdf/badges/version.svg)](https://anaconda.org/conda-forge/pyhdf)
+
+# pyhdf
+
+pyhdf is a python wrapper around the NCSA HDF version 4 library.
+The SD (Scientific Dataset), VS (Vdata) and V (Vgroup) API's 
+are currently implemented. NetCDF files can also be
+read and modified. It supports both Python 2 and Python 3.
+
+*Note:* The sourceforge pyhdf
+[website](http://pysclint.sourceforge.net/pyhdf/) and
+[project](https://sourceforge.net/projects/pysclint/) are out-of-date.
+The original author of pyhdf have abandoned the project and it is
+currently maintained in [github](https://github.com/fhs/pyhdf).
+
+Version 0.9.x was called
+[python-hdf4](https://pypi.org/project/python-hdf4/)
+in PyPI because at that time we didn't have
+[access](https://github.com/pypa/warehouse/issues/5157) to the
+[pyhdf package](https://pypi.org/project/pyhdf/) in PyPI.  For version
+0.10.0 and onward, please install `pyhdf` instead of `python-hdf4`.
+
+## Installation
+
+See [pyhdf installation instructions](http://fhs.github.io/pyhdf/install.html)
+or [doc/install.rst](doc/install.rst).
+
+## Documentation
+
+See [pyhdf documentation](http://fhs.github.io/pyhdf/).
+
+Additional documentation on the HDF4 format can be found in the
+[HDF4 Support Page](https://portal.hdfgroup.org/display/HDF4/HDF4).
+
+## Examples
+
+Example python programs using the pyhdf package
+can be found inside the [examples/](examples/) subdirectory.


=====================================
README.rst deleted
=====================================
@@ -1,39 +0,0 @@
-.. image:: https://travis-ci.org/fhs/python-hdf4.svg?branch=master
-    :target: https://travis-ci.org/fhs/python-hdf4
-
-Overview
-========
-
-Python-HDF4 is a fork of pyhdf_ with some improvements:
-
-- Various bug fixes: removes use of deprecated numpy API, python 2.7 compatibility, etc.
-- Adds support for Python 3, while keeping compatibility with Python 2.
-- Sphinx documentation
-
-Python-HDF4 is a python wrapper around the NCSA HDF version 4 library.
-The SD (Scientific Dataset), VS (Vdata) and V (Vgroup) API's 
-are currently implemented. NetCDF files can also be
-read and modified.
-
-.. _pyhdf: http://pysclint.sourceforge.net/pyhdf/
-
-Installation
-============
-
-To install, see http://fhs.github.io/python-hdf4/install.html
-or file `doc/install.rst <doc/install.rst>`_.
-
-Documentation
-=============
-
-For documentation, see http://fhs.github.io/python-hdf4/
-
-Additional documentation on the HDF4 format can be
-found in the User Guide:
-http://www.hdfgroup.org/release4/doc/UsrGuide_html/UG_Top.html
-
-Examples
-========
-
-Example python programs using the pyhdf package
-can be found inside the examples/ subdirectory.


=====================================
README_pyhdf deleted
=====================================
@@ -1,75 +0,0 @@
-# $Id: README,v 1.7 2008-08-05 00:20:43 gosselin_a Exp $
-# $Log: not supported by cvs2svn $
-# Revision 1.6  2008/06/30 02:41:44  gosselin_a
-# Preleminary check-in of changes leading to the 0.8 revision.
-#   - switch to numpy, Numeric now unsupported
-#   - better documentation of the compression features
-#   - some bug fixes
-#
-# Revision 1.5  2004/08/02 17:04:38  gosselin
-# pyhdf-0.7-2
-#
-# Revision 1.3  2004/08/02 15:29:52  gosselin
-# pyhdf-0.7-1
-#
-# Revision 1.2  2004/08/02 15:16:38  gosselin
-# pyhdf 0.6-1
-#
-# Revision 1.1  2004/08/02 14:45:56  gosselin
-# Initial revision
-#
-
-Author:         Andre Gosselin
-                Maurice Lamontagne Institute
-                Fisheries and Oceans Department
-                Government of Canada
-                Mont-Joli, Canada
-                Andre.Gosselin at dfo-mpo.gc.ca
-
-Maintainer:     Enthought, Inc.
-                Austin, TX
-                enthought-dev at mail.enthought.com
-
-
-
-Latest version: 0.8-3
-Date:  October 2 2008
-
-pyhdf is a python wrapper around the NCSA HDF version 4 library.
-The SD (Scientific Dataset), VS (Vdata) and V (Vgroup) API's 
-are currently implemented. netCDF files can also be 
-read and modified.
-
-Functionality of version 0.8 is same as 0.7-3, but it uses 
-NumPy package rather than Numeric.
-
-
-INSTALLATION:
-
-  To install, see file INSTALL.
-
-DOCUMENTATION:
-
-  For documentation, see the doc/ subdirectory:
-    -pyhdf.HDF.txt  text format
-    -pyhdf.HDF.html html format
-    -pyhdf.SD.txt   text format
-    -pyhdf.SD.html  html format
-    -pyhdf.VS.txt   text format
-    -pyhdf.VS.html  html format
-    -pyhdf.V.txt    text format
-    -pyhdf.V.html   html format
-
-  Additional documentation on the HDF4 format can be
-  found in the User Guide:
-    http://hdf.ncsa.uiuc.edu/training/HDFtraining/UsersGuide/
-
-EXAMPLES:
-
-  Example python programs using the pyhdf package
-  can be found inside the examples/ subdirectory.
-
-FINAL NOTES:
-
-  Please report all bugs and problems to the maintainer at the
-  address given above. Author can also be contacted.


=====================================
doc/Makefile
=====================================
@@ -85,17 +85,17 @@ qthelp:
 	@echo
 	@echo "Build finished; now you can run "qcollectiongenerator" with the" \
 	      ".qhcp project file in $(BUILDDIR)/qthelp, like this:"
-	@echo "# qcollectiongenerator $(BUILDDIR)/qthelp/python-hdf4.qhcp"
+	@echo "# qcollectiongenerator $(BUILDDIR)/qthelp/pyhdf.qhcp"
 	@echo "To view the help file:"
-	@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/python-hdf4.qhc"
+	@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/pyhdf.qhc"
 
 devhelp:
 	$(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
 	@echo
 	@echo "Build finished."
 	@echo "To view the help file:"
-	@echo "# mkdir -p $$HOME/.local/share/devhelp/python-hdf4"
-	@echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/python-hdf4"
+	@echo "# mkdir -p $$HOME/.local/share/devhelp/pyhdf"
+	@echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/pyhdf"
 	@echo "# devhelp"
 
 epub:


=====================================
doc/conf.py
=====================================
@@ -1,6 +1,6 @@
 # -*- coding: utf-8 -*-
 #
-# python-hdf4 documentation build configuration file, created by
+# pyhdf documentation build configuration file, created by
 # sphinx-quickstart2 on Sun Jul 27 02:07:57 2014.
 #
 # This file is execfile()d with the current directory set to its
@@ -46,17 +46,17 @@ source_suffix = '.rst'
 master_doc = 'index'
 
 # General information about the project.
-project = u'python-hdf4'
-copyright = u'2014, python-hdf4 authors'
+project = u'pyhdf'
+copyright = u'2019, pyhdf authors'
 
 # The version info for the project you're documenting, acts as replacement for
 # |version| and |release|, also used in various other places throughout the
 # built documents.
 #
 # The short X.Y version.
-version = '0.9'
+version = '0.10'
 # The full version, including alpha/beta/rc tags.
-release = '0.9'
+release = '0.10.1'
 
 # The language for content autogenerated by Sphinx. Refer to documentation
 # for a list of supported languages.
@@ -179,7 +179,7 @@ html_static_path = ['_static']
 #html_file_suffix = None
 
 # Output file base name for HTML help builder.
-htmlhelp_basename = 'python-hdf4doc'
+htmlhelp_basename = 'pyhdfdoc'
 
 
 # -- Options for LaTeX output ---------------------------------------------
@@ -199,8 +199,8 @@ latex_elements = {
 # (source start file, target name, title,
 #  author, documentclass [howto, manual, or own class]).
 latex_documents = [
-  ('index', 'python-hdf4.tex', u'python-hdf4 Documentation',
-   u'python-hdf4 authors', 'manual'),
+  ('index', 'pyhdf.tex', u'pyhdf Documentation',
+   u'pyhdf authors', 'manual'),
 ]
 
 # The name of an image file (relative to this directory) to place at the top of
@@ -229,8 +229,8 @@ latex_documents = [
 # One entry per manual page. List of tuples
 # (source start file, name, description, authors, manual section).
 man_pages = [
-    ('index', 'python-hdf4', u'python-hdf4 Documentation',
-     [u'python-hdf4 authors'], 1)
+    ('index', 'pyhdf', u'pyhdf Documentation',
+     [u'pyhdf authors'], 1)
 ]
 
 # If true, show URL addresses after external links.
@@ -243,8 +243,8 @@ man_pages = [
 # (source start file, target name, title, author,
 #  dir menu entry, description, category)
 texinfo_documents = [
-  ('index', 'python-hdf4', u'python-hdf4 Documentation',
-   u'python-hdf4 authors', 'python-hdf4', 'One line description of project.',
+  ('index', 'pyhdf', u'pyhdf Documentation',
+   u'pyhdf authors', 'pyhdf', 'One line description of project.',
    'Miscellaneous'),
 ]
 


=====================================
doc/index.rst
=====================================
@@ -1,18 +1,17 @@
-.. python-hdf4 documentation master file, created by
+.. pyhdf documentation master file, created by
    sphinx-quickstart2 on Sun Jul 27 02:07:57 2014.
    You can adapt this file completely to your liking, but it should at least
    contain the root `toctree` directive.
 
-Welcome to python-hdf4's documentation!
+Welcome to pyhdf's documentation!
 =======================================
 
-Python-HDF4 is a python wrapper around the NCSA HDF version 4 library. The SD
+pyhdf is a python wrapper around the NCSA HDF version 4 library. The SD
 (Scientific Dataset), VS (Vdata) and V (Vgroup) API's are currently
 implemented. NetCDF files can also be read and modified.
 
-Python-HDF4 is a fork of `pyhdf <http://pysclint.sourceforge.net/pyhdf/>`_.
 Development for this library happens in github:
-https://github.com/fhs/python-hdf4/
+https://github.com/fhs/pyhdf/
 
 
 Contents:


=====================================
doc/install.rst
=====================================
@@ -2,30 +2,45 @@
 Installation
 ============
 
-Python-HDF4 supports installation on Python 2 and Python 3. Please open an
+pyhdf supports installation on Python 2 and Python 3. Please open an
 issue here if you encounter any problems during installation:
-https://github.com/fhs/python-hdf4/issues
+https://github.com/fhs/pyhdf/issues
 
-The source code of the latest release of Python-HDF4 can be obtained from
-either of these two location:
+The recommended method of installing
+pyhdf is to use conda.  See the `Conda user guide
+<https://conda.io/projects/conda/en/latest/user-guide/getting-started.html>`_
+on how to install conda and activate your conda environment.
+Once you're in the conda environment, install `pyhdf from conda-forge
+<https://anaconda.org/conda-forge/pyhdf>`_::
+
+    conda install -c conda-forge pyhdf
 
-*  PyPi / the cheeseshop: https://pypi.python.org/pypi/python-hdf4
-*  Github: https://github.com/fhs/python-hdf4/releases
+If you don't want to use conda, the instructions below describes how you
+can compile pyhdf from source.
 
 
+Download the source
+-------------------
+
+The source code of the latest release of pyhdf can be obtained from
+either of these two location:
+
+*  PyPi / the cheeseshop: https://pypi.python.org/pypi/pyhdf
+*  Github: https://github.com/fhs/pyhdf/releases
+
 Requirements
 ------------
 
-The following packages are required to build and install Python-HDF4:
+The following packages are required to build and install pyhdf:
 
 - `Python <http://www.python.org>`_:
   Python 2.6 or newer for Python 2, or Python 3.2 or newer for Python 3.
-- `NumPy <http://www.scipy.org>`_
-- `HDF4 libraries <http://www.hdfgroup.org/release4/obtain.html>`_ (to use
+- `NumPy <http://www.numpy.org/>`_
+- `HDF4 libraries <https://portal.hdfgroup.org/display/support/Download+HDF4>`_ (to use
   their HDF4 binaries, you will also need szip, available from the same page)
 - Compiler suite e.g. `GCC <http://gcc.gnu.org>`_.
-  On Windows, you can use `Mingw32 compiler <http://www.mingw.org>`_ or Visual
-  Studio .NET 2003.
+  On Windows, you need to use a `compatible Visual C++ compiler
+  <https://wiki.python.org/moin/WindowsCompilers>`_.
 - `zlib <http://www.zlib.net/>`_
 - `libjpeg <http://www.ijg.org/>`_ 
 
@@ -34,26 +49,10 @@ all the requirements for Python 3 using this command::
 
     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>`_. 
-
-Installing from the Cheeseshop
-------------------------------
-
-To install Python-HDF4 from The Python Package Index (Cheeseshop), open a
-command prompt and type::
-
-    pip install python-hdf4
-
-On Debian based systems, you can obtain the ``pip`` command by running::
-
-    apt-get install python-pip -y
-
-
 Installing from the source archive
 ----------------------------------
 
-1. Go to the Python-HDF4 source directory.
+1. Go to the pyhdf source directory.
 
 2. If your HDF4 libraries or include files reside in directories
    that are not searched by default on your system, the installation script
@@ -108,49 +107,6 @@ script should display the file structure. This is a handy tool to have
 around when you want to explore the contents of any HDF4 file.
 
 
-Quick install for Windows Users
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-1. Download the complete HDF4 binary package from the link given
-   below.  These packages include all libraries needed to compile
-   Python-HDF4. There are two binary packages to choose from depending on
-   whether or not you want to compile Python-HDF4 with SZIP encoding enabled
-   or disabled.  There are different licensing implications for each
-   choice (see `the HDF page
-   <http://hdfgroup.com/doc_resource/SZIP/>`_ for more details on the
-   licensing of SZIP).
-
-   - `HDF4 with encoding enabled <http://pysclint.sourceforge.net/pyhdf/hdf4-all-enc.zip>`_
-   - `HDF4 with encoding disabled <http://pysclint.sourceforge.net/pyhdf/hdf4-all-noenc.zip>`_
-
-2. Unzip the selected package into a directory of your choice (e.g. ``C:\HDF4``).  
-
-3. Go to the Python-HDF4 source directory.
-
-4. Build the package in one of the two following ways:
-
-   * Set the HDF4 environment variable to the directory where you unpacked the
-     binary and (e.g. ``C:\HDF4``). Then run the following::
-
-	   python setup.py build
-
-   * Run ``python setup.py build --hdf4 <directory of unzipped package>`` where
-     ``<directory of unzipped package>`` is the location where you unzipped the
-     downloaded HDF4 binary (e.g. ``C:\HDF4``).
-
-   *NOTE*: If you are using the mingw32 compiler and are using the
-   standard Python binary distribution, then you need to specify -c
-   mingw32 on the command line as well.
-
-5. To install Python-HDF4 or build a binary distribution (bdist_msi,
-   bdist_wininst, bdist_egg, etc.), run one of the following commands::
-
-	python setup.py install
-	python setup.py bdist_msi
-	python setup.py bdist_wininst
-	python setup.py bdist_egg
-
-
 Further notes
 -------------
 
@@ -173,9 +129,8 @@ capability.
 Getting an SZIP enabled HDF library may require compiling the library
 from source with the "--with-szlib" configuration option.  Note that
 you *must* install SZIP in a separate step. For more details, see the
-`NCSA hdf site <http://hdf.ncsa.uiuc.edu/doc_resource/SZIP/>`_.
-Source code and binaries are `available for download
-<ftp://ftp.hdfgroup.org/lib-external/szip/>`_.
+`HDF Group site
+<https://portal.hdfgroup.org/display/HDF5/Szip+Compression+in+HDF+Products>`_.
 
 In case your HDF library was compiled with SZIP support and you abide by the
 szip licensing terms, set the environment variable ``SZIP`` to ``1``.


=====================================
doc/make.bat
=====================================
@@ -115,9 +115,9 @@ if "%1" == "qthelp" (
 	echo.
 	echo.Build finished; now you can run "qcollectiongenerator" with the ^
 .qhcp project file in %BUILDDIR%/qthelp, like this:
-	echo.^> qcollectiongenerator %BUILDDIR%\qthelp\python-hdf4.qhcp
+	echo.^> qcollectiongenerator %BUILDDIR%\qthelp\pyhdf.qhcp
 	echo.To view the help file:
-	echo.^> assistant -collectionFile %BUILDDIR%\qthelp\python-hdf4.ghc
+	echo.^> assistant -collectionFile %BUILDDIR%\qthelp\pyhdf.ghc
 	goto end
 )
 


=====================================
examples/compress/test-compress.py
=====================================
@@ -5,7 +5,7 @@ from __future__ import print_function
 # Generate test HDF files using different compression configurations,
 # and validate each resulting file to make sure its contents is OK.
 # Adapted from example:
-# "hdf.ncsa.uiuc.edu/doc_resource/SZIP/h4_examples/szip32.c".
+# "https://support.hdfgroup.org/doc_resource/SZIP/h4_examples/szip32.c".
 # A bigger dataset is defined to better show the size reduction achieved
 # by the SZIP compression.
 # Note that when applied to HDF4 SDS, the word "pixels" as used inside


=====================================
examples/runall.py
=====================================
@@ -0,0 +1,69 @@
+#!/usr/bin/env python
+"""
+This script runs all the examples in examples directory.
+It should be run from the top-level directory (containing setup.py).
+"""
+
+import glob
+import os
+import sys
+import subprocess
+
+try:
+    from subprocess import DEVNULL # py3k
+except ImportError:
+    DEVNULL = open(os.devnull, 'wb')
+
+class ExampleTester:
+    failed = []
+    passed = 0
+    rootdir =  os.getcwd()
+
+    def __init__(self):
+        subprocess.check_call([sys.executable, "setup.py", "build_ext", "--inplace"])
+        os.environ["PYTHONPATH"] = self.rootdir
+
+    def run(self, d, cmd, **kwargs):
+        """
+        Run command cmd in directory d.
+        """
+        print("running %s in %s ..." % (cmd, d))
+        os.chdir(os.path.join(self.rootdir, d))
+        r = subprocess.call([sys.executable] + cmd, **kwargs)
+        if r != 0:
+            self.failed.append((d, cmd, r))
+        else:
+            self.passed += 1
+        os.chdir(self.rootdir)
+        return r
+
+    def report(self):
+        print(self.passed, "example(s) ran successfully")
+        if len(self.failed) > 0:
+            print("failed examples:")
+            for ex in self.failed:
+                print("  %s in %s failed with exit code %s" % (ex[1], ex[0], ex[2]))
+            sys.exit(2)
+        sys.exit(0)
+
+def main():
+    t = ExampleTester()
+    t.run("examples/compress", ["test-compress.py"], stdout=DEVNULL)
+    t.run("examples/vgroup", ["vgwrite.py"])
+    t.run("examples/vgroup", ["vgread.py", "inventory.hdf"], stdout=DEVNULL)
+    t.run("examples/inventory", ["inventory_1-1.py"])
+    t.run("examples/inventory", ["inventory_1-2.py"])
+    t.run("examples/inventory", ["inventory_1-3.py"])
+    t.run("examples/inventory", ["inventory_1-4.py"], stdout=DEVNULL)
+    t.run("examples/inventory", ["inventory_1-5.py"], stdout=DEVNULL)
+    t.run("examples/txttohdf", ["txttohdf.py"])
+
+    # These HDF files were generated by above examples
+    for g in sorted(glob.glob("examples/*/*.hdf")):
+        hdffile = os.path.join("../..", g)
+        t.run("examples/hdfstruct", ["hdfstruct.py", hdffile], stdout=DEVNULL)
+
+    t.report()
+
+if __name__ == '__main__':
+    main()


=====================================
private-info deleted
=====================================
@@ -1,45 +0,0 @@
-$Id: private-info,v 1.3 2008-06-30 02:41:44 gosselin_a Exp $
-$Log: not supported by cvs2svn $
-Revision 1.2  2005/07/14 01:36:41  gosselin_a
-pyhdf-0.7-3
-Ported to HDF4.2r1.
-Support for SZIP compression on SDS datasets.
-All classes are now 'new-style' classes, deriving from 'object'.
-Update documentation.
-
-Revision 1.1  2004/11/02 21:17:54  gosselin
-Initial revision
-
-
-To generate interface files :
-
-  % cd pyhdf
-  % swig -python hdfext.i
-
-To generate source distributon:
-
-  % python setup.py sdist
-
-  The tarball is generated inside directory `dist/'.
-
-To install:
-
-  % su 
-  # rm -rf /usr/lib/python???/site-packages/pyhdf
-  # cd dist
-  # tar xvfz pyhdf*.tar.gz
-  # cd pyhdf-*
-  # python setup.py install
-
-  Package is installed inside directory `/usr/lib/python???/site-packages/pyhdf'.
-
-To generate documentation: install pyhdf and then
-
-  % pydoc    pyhdf.HDF > pyhdf.HDF.txt
-  % pydoc -w pyhdf.HDF > pyhdf.HDF.html
-  % pydoc    pyhdf.SD  > pyhdf.SD.txt
-  % pydoc -w pyhdf.SD  > pyhdf.SD.html
-  % pydoc    pyhdf.VS  > pyhdf.VS.txt
-  % pydoc -w pyhdf.VS  > pyhdf.VS.html
-  % pydoc    pyhdf.V   > pyhdf.V.txt
-  % pydoc -w pyhdf.V   > pyhdf.V.html


=====================================
pyhdf/HDF.py
=====================================
@@ -16,7 +16,6 @@ Basic API (:mod:`pyhdf.HDF`)
 
 A module of the pyhdf package implementing the basic API of the
 NCSA HDF4 library.
-(see: hdf.ncsa.uiuc.edu)
 
 Introduction
 ------------


=====================================
pyhdf/Makefile
=====================================
@@ -1,976 +1,13 @@
-# $Id: Makefile,v 1.4 2008-06-30 02:41:44 gosselin_a Exp $
-# $Log: not supported by cvs2svn $
-# Revision 1.3  2005/07/14 01:36:41  gosselin_a
-# pyhdf-0.7-3
-# Ported to HDF4.2r1.
-# Support for SZIP compression on SDS datasets.
-# All classes are now 'new-style' classes, deriving from 'object'.
-# Update documentation.
-#
-# Revision 1.2  2004/11/03 16:02:06  gosselin_a
-# Change include and lib directories to the Python2.4 distribution
-# (previously Python2.3).
-#
-# Revision 1.1  2004/08/02 15:00:34  gosselin
-# Initial revision
-#
-#
-# ------------------------------------------------------------
-# SWIG Examples Makefile
-#
-# This file is used by the examples to build modules.  Assuming
-# you ran configure, this file will probably work.  However,
-# it's not perfect so you might need to do some hand tweaking.
-#
-# Other notes:
-#
-# 1.   Take a look at the prefixes below.   Since SWIG works with
-#      multiple target languages, you may need to find out where
-#      certain packages have been installed.   Set the prefixes
-#      accordingly.
-#
-# 2.   To use this makefile, simply set SRCS, INTERFACE, INCLUDES, LIBS,
-#      TARGET, and do a
-#           $(MAKE) -f Makefile.template.in SRCS='$(SRCS)' \
-#           INCLUDES='$(INCLUDES) LIBS='$(LIBS)' INTERFACE='$(INTERFACE)' \
-#           TARGET='$(TARGET)' method
-#
-#      'method' describes what is being built.
-#---------------------------------------------------------------
 
-# Adjust for the local installation
-# See also PYTHON section below
-# 
-INCLUDES = -I/usr/include/hdf
-LIBS       = -L/usr/lib/hdf -lmfhdf -ldf -lz -ljpeg 
-#LIBS       = -L/usr/lib/hdf -lmfhdf -ldf -lz -ljpeg -lsz
+.PHONY: build
+build: hdfext.py hdfext_wrap.c
 
-TARGET     = hdfext
-INTERFACE  = hdfext.i
+hdfext.py: hdfext.i
+	swig -python hdfext.i
 
-CC         = gcc
-CXX        = g++
-CFLAGS     =
-prefix     = /usr
-exec_prefix= ${prefix}
-SRCS       = 
-SWIGOPT    = 
-SWIG       = swig
-RUNTIMEDIR = $(exec_prefix)/lib
-
-LIBM       = -lieee -lm
-LIBC       = 
-LIBCRYPT   = -lcrypt
-SYSLIBS    = $(LIBM) $(LIBC) $(LIBCRYPT)
-
-libtool_comp = $(TOP)/../Tools/libtool --mode compile
-libtool_link = $(TOP)/../Tools/libtool --mode link
-
-# X11 options
-
-XLIB       = -L/usr/X11R6/lib -lX11
-XINCLUDE   = -I/usr/X11R6/include
-
-IWRAP      = $(INTERFACE:.i=_wrap.i)
-ISRCS      = $(IWRAP:.i=.c)
-ICXXSRCS   = $(IWRAP:.i=.cxx)
-IOBJS      = $(IWRAP:.i=.o)
-
-##################################################################
-# Dynamic loading for C++
-# If you are going to be building dynamic loadable modules in C++,
-# you may need to edit this line appropriately.
-#
-# This line works for g++, but I'm not sure what it might be
-# for other C++ compilers
-##################################################################
-
-CPP_DLLIBS = #-L/usr/local/lib/gcc-lib/sparc-sun-solaris2.5.1/2.7.2 \
-             -L/usr/local/lib -lg++ -lstdc++ -lgcc
-
-# Solaris workshop 5.0 
-# CPP_DLLIBS = -L/opt/SUNWspro/lib -lCrun
-
-# Symbols used for using shared libraries
-SO=		.so
-LDSHARED=	gcc -shared
-CCSHARED=	-fpic
-CXXSHARED=      gcc -shared
-
-# This is used for building shared libraries with a number of C++
-# compilers.   If it doesn't work,  comment it out.
-CXXSHARED= g++ -shared 
-
-OBJS      = $(SRCS:.c=.o) $(CXXSRCS:.cxx=.o)
-
-##################################################################
-#####                       Tcl/Tk                          ######
-##################################################################
-
-# Set these to your local copy of Tcl/Tk.
-
-TCL_INCLUDE = -I/usr/include
-TCL_LIB     = -L/usr/lib -ltcl8.3${TCL_DBGX}
-TCL_OPTS    = -ldl 
-TK_OPTS     = -ltk -ltcl -ldl 
-
-# Extra Tcl specific dynamic linking options
-TCL_DLNK   = 
-
-# -----------------------------------------------------------
-# Build a new version of the tclsh shell
-# -----------------------------------------------------------
-
-
-tclsh: $(SRCS)
-	$(SWIG) -tcl8 $(SWIGOPT) $(TCL_SWIGOPTS) -ltclsh.i $(INTERFACE)
-	$(CC) $(CFLAGS) $(SRCS) $(ISRCS) $(INCLUDES) $(TCL_INCLUDE) \
-	$(TCL_LIB)  $(TCL_OPTS) $(LIBS) $(SYSLIBS) -o $(TARGET)
-
-tclsh_cpp: $(SRCS)
-	$(SWIG) -tcl8 -c++ $(SWIGOPT) $(TCL_SWIGOPTS) -ltclsh.i $(INTERFACE)
-	$(CXX) $(CFLAGS) $(SRCS) $(CXXSRCS) $(ICXXSRCS) $(INCLUDES) $(TCL_INCLUDE) \
-	$(TCL_LIB) $(TCL_OPTS) $(LIBS) $(SYSLIBS) -o $(TARGET)
-
-# -----------------------------------------------------------
-# Build a new copy of wish
-# -----------------------------------------------------------
-
-wish: $(SRCS)
-	$(SWIG) -tcl8 $(SWIGOPT) $(TCL_SWIGOPTS) -lwish.i $(INTERFACE)
-	$(CC) $(CFLAGS) $(SRCS) $(ISRCS) $(INCLUDES) $(TCL_INCLUDE) \
-	$(XINCLUDE) $(TCL_LIB) $(TK_OPTS) $(XLIB) $(LIBS) $(SYSLIBS) -o $(TARGET)
-
-
-wish_cpp: $(SRCS)
-	$(SWIG) -tcl8 -c++ $(SWIGOPT) $(TCL_SWIGOPTS) -lwish.i $(INTERFACE)
-	$(CXX) $(CFLAGS) $(SRCS) $(CXXSRCS) $(ICXXSRCS) $(INCLUDES) $(TCL_INCLUDE) \
-	$(XINCLUDE) $(TCL_LIB) $(TK_OPTS) $(XLIB) $(LIBS) $(SYSLIBS) -o $(TARGET)
-
-# -----------------------------------------------------------
-# Build a Tcl dynamic loadable module (you might need to tweak this)
-# -----------------------------------------------------------
-
-tcl:  $(SRCS)
-	$(SWIG) -tcl8 $(SWIGOPT) $(TCL_SWIGOPTS) $(INTERFACE)
-	$(CC) -c $(CCSHARED) $(CFLAGS) $(SRCS) $(ISRCS) $(INCLUDES) $(TCL_INCLUDE)
-	$(LDSHARED) $(OBJS) $(IOBJS) $(TCL_DLNK) $(LIBS) -o $(TARGET)$(SO)
-
-# -----------------------------------------------------------
-# Build a Tcl7.5 dynamic loadable module for C++
-# -----------------------------------------------------------
-
-tcl_cpp: $(SRCS)
-	$(SWIG) -tcl8 -c++ $(SWIGOPT) $(TCL_SWIGOPTS) $(INTERFACE)
-	$(CXX) -c $(CCSHARED) $(CFLAGS) $(SRCS) $(CXXSRCS) $(ICXXSRCS) $(INCLUDES) $(TCL_INCLUDE)
-	$(CXXSHARED) $(OBJS) $(IOBJS) $(TCL_DLNK) $(LIBS) $(CPP_DLLIBS) -o $(TARGET)$(SO)
-
-# -----------------------------------------------------------
-# Build a Tcl7.5 dynamic loadable module, linked against SWIG runtime lib
-# -----------------------------------------------------------
-
-TCL_RUNTIME=-L$(RUNTIMEDIR) -lswigtcl8
-
-tcl_multi:  $(SRCS)
-	$(SWIG) -c -tcl8 $(SWIGOPT) $(TCL_SWIGOPTS) $(INTERFACE)
-	$(CC) -c $(CCSHARED) $(CFLAGS) $(SRCS) $(ISRCS) $(INCLUDES) $(TCL_INCLUDE)
-	$(LDSHARED) $(OBJS) $(IOBJS) $(TCL_RUNTIME) $(TCL_DLNK) $(LIBS) -o $(TARGET)$(SO)
-
-tcl_multi_cpp: $(SRCS)
-	$(SWIG) -c -tcl8 -c++ $(SWIGOPT) $(TCL_SWIGOPTS) $(INTERFACE)
-	$(CXX) -c $(CCSHARED) $(CFLAGS) $(SRCS) $(CXXSRCS) $(ICXXSRCS) $(INCLUDES) $(TCL_INCLUDE)
-	$(CXXSHARED) $(OBJS) $(IOBJS) $(TCL_RUNTIME) $(TCL_DLNK) $(LIBS) $(CPP_DLLIBS) -o $(TARGET)$(SO)
-
-# -----------------------------------------------------------------
-# Cleaning the Tcl examples
-# -----------------------------------------------------------------
-
-tcl_clean:
-	rm -f *.o *.so *_wrap* *~ .~* core  mytclsh 
-
-##################################################################
-#####                       PERL 5                          ######
-##################################################################
-
-# You need to set this variable to the Perl5 directory containing the
-# files "perl.h", "EXTERN.h" and "XSUB.h".   With Perl5.003, it's
-# usually something like /usr/local/lib/perl5/arch-osname/5.003/CORE.
-
-PERL5_INCLUDE= /usr/lib/perl5/5.8.0/i386-linux-thread-multi/CORE
-
-# Extra Perl specific dynamic linking options
-PERL5_DLNK   = 
-
-PERL5_CCFLAGS = -D_REENTRANT -D_GNU_SOURCE -fno-strict-aliasing -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/include/gdbm
-
-# ----------------------------------------------------------------
-# Build a Perl5 dynamically loadable module (C)
-# ----------------------------------------------------------------
-
-perl5: $(SRCS)
-	$(SWIG) -perl5 $(SWIGOPT) $(INTERFACE)
-	$(CC) -c -Dbool=char $(CCSHARED) $(CFLAGS) $(SRCS) $(ISRCS) $(INCLUDES) $(PERL5_CCFLAGS) -I$(PERL5_INCLUDE)
-	$(LDSHARED) $(OBJS) $(IOBJS) $(PERL5_DLNK) $(LIBS) -o $(TARGET)$(SO)
-
-# ----------------------------------------------------------------
-# Build a Perl5 dynamically loadable module (C++)
-# ----------------------------------------------------------------
-
-perl5_cpp: $(SRCS)
-	$(SWIG) -perl5 -c++ $(SWIGOPT) $(INTERFACE)
-	$(CXX) -c $(CCSHARED) $(CFLAGS) -Dexplicit= $(SRCS) $(CXXSRCS) $(ICXXSRCS) $(INCLUDES) $(PERL5_CCFLAGS) -I$(PERL5_INCLUDE)
-	$(CXXSHARED) $(OBJS) $(IOBJS) $(PERL5_DLNK) $(LIBS) $(CPP_DLLIBS) -o $(TARGET)$(SO)
-
-# ----------------------------------------------------------------
-# Build a Perl5 dynamically loadable module, linked against SWIG runtime lib
-# ----------------------------------------------------------------
-
-PERL5_RUNTIME=-L$(RUNTIMEDIR) -lswigpl
-
-perl5_multi: $(SRCS)
-	$(SWIG) -c -perl5 $(SWIGOPT) $(INTERFACE)
-	$(CC) -c -Dbool=char $(CCSHARED) $(CFLAGS) $(SRCS) $(ISRCS) $(INCLUDES) $(PERL5_CCFLAGS) -I$(PERL5_INCLUDE)
-	$(LDSHARED) $(OBJS) $(IOBJS) $(PERL5_RUNTIME) $(PERL5_DLNK) $(LIBS) -o $(TARGET)$(SO)
-
-perl5_multi_cpp: $(SRCS)
-	$(SWIG) -c -perl5 -c++ $(SWIGOPT) $(INTERFACE)
-	$(CXX) -c $(CCSHARED) $(CFLAGS) -Dexplicit= $(SRCS) $(CXXSRCS) $(ICXXSRCS) $(INCLUDES) $(PERL5_CCFLAGS) -I$(PERL5_INCLUDE)
-	$(CXXSHARED) $(OBJS) $(IOBJS) $(PERL5_RUNTIME) $(PERL5_DLNK) $(LIBS) $(CPP_DLLIBS) -o $(TARGET)$(SO)
-
-# ----------------------------------------------------------------
-# Build a module from existing XS C source code.   (ie. from xsubpp).
-# ----------------------------------------------------------------
-perl5_xs: $(SRCS)
-	$(CC) -c $(CCSHARED) $(CFLAGS) $(SRCS) $(INCLUDES) -I$(PERL5_INCLUDE)
-	$(LDSHARED) $(OBJS) $(LIBS) -o $(TARGET)$(SO)
-
-# ----------------------------------------------------------------
-# Build a statically linked Perl5 executable
-# ----------------------------------------------------------------
-
-PERL5_LIB    = -L$(PERL5_INCLUDE) -lperl.so -ldl  $(SYSLIBS)
-
-perl5_static: $(SRCS)
-	$(SWIG) -perl5 -static -lperlmain.i $(SWIGOPT) $(INTERFACE)
-	$(CC) $(CFLAGS) -Dbool=char $(SRCS) $(ISRCS) $(INCLUDES) -I$(PERL5_INCLUDE) $(PERL5_LIB) $(LIBS) -o $(TARGET)
-
-perl5_static_cpp: $(SRCS)
-	$(SWIG) -perl5 -c++ -static -lperlmain.i $(SWIGOPT) $(INTERFACE)
-	$(CXX) $(CFLAGS) -Dexplicit= $(SRCS) $(CXXSRCS) $(ICXXSRCS) $(INCLUDES) -I$(PERL5_INCLUDE) $(PERL5_LIB) $(LIBS) -o $(TARGET)
-
-# -----------------------------------------------------------------
-# Cleaning the Perl5 examples
-# -----------------------------------------------------------------
-
-perl5_clean:
-	rm -f *.o *.so *_wrap* *~ .~* core  myperl *.pm
-
-##################################################################
-#####                       PYTHON                          ######
-##################################################################
-
-# Make sure these locate your Python installation
-PYTHON_VER = python2.4
-PYTHON_INCLUDE= -DHAVE_CONFIG_H \
-                -I/usr/include/${PYTHON_VER} \
-                -I/usr/lib/${PYTHON_VER}/config \
-                -I/usr/lib/${PYTHON_VER}/site-packages/numpy/core/include
-PYTHON_LIB    = /usr/lib/${PYTHON_VER}/config
-
-# Extra Python specific dynamic linking options
-PYTHON_DLNK   = 
-
-# ----------------------------------------------------------------
-# Build a C dynamically loadable module
-# ----------------------------------------------------------------
-
-python: $(SRCS)
-	$(SWIG) -python $(SWIGOPT) $(INTERFACE)
-	$(CC) -c $(CCSHARED) $(CFLAGS) $(ISRCS) $(SRCS) $(INCLUDES) $(PYTHON_INCLUDE)
-	$(LDSHARED) $(OBJS) $(IOBJS) $(PYTHON_DLNK) $(LIBS) -o _$(TARGET)$(SO)
-
-# -----------------------------------------------------------------
-# Build a C++ dynamically loadable module
-# -----------------------------------------------------------------
-
-python_cpp: $(SRCS)
-	$(SWIG) -c++ -python $(SWIGOPT) $(INTERFACE)
-	$(CXX) -c $(CCSHARED) $(CFLAGS) $(ICXXSRCS) $(SRCS) $(CXXSRCS) $(INCLUDES) $(PYTHON_INCLUDE)
-	$(CXXSHARED) $(OBJS) $(IOBJS) $(PYTHON_DLNK) $(LIBS) $(CPP_DLLIBS) -o _$(TARGET)$(SO)
-
-# -----------------------------------------------------------------
-# Build a dynamically loadable module, linked against SWIG Runtime lib
-# -----------------------------------------------------------------
-
-PYTHON_RUNTIME=-L$(RUNTIMEDIR) -lswigpy
-
-python_multi: $(SRCS)
-	$(SWIG) -c -python $(SWIGOPT) $(INTERFACE)
-	$(CC) -c $(CCSHARED) $(CFLAGS) $(ISRCS) $(SRCS) $(INCLUDES) $(PYTHON_INCLUDE)
-	$(LDSHARED) $(OBJS) $(IOBJS) $(PYTHON_RUNTIME) $(PYTHON_DLNK) $(LIBS) -o _$(TARGET)$(SO)
-
-python_multi_cpp: $(SRCS)
-	$(SWIG) -c -c++ -python $(SWIGOPT) $(INTERFACE)
-	$(CXX) -c $(CCSHARED) $(CFLAGS) $(ICXXSRCS) $(SRCS) $(CXXSRCS) $(INCLUDES) $(PYTHON_INCLUDE)
-	$(CXXSHARED) $(OBJS) $(IOBJS) $(PYTHON_RUNTIME) $(PYTHON_DLNK) $(LIBS) $(CPP_DLLIBS) -o _$(TARGET)$(SO)
-
-
-# -----------------------------------------------------------------
-# Build statically linked Python interpreter
-#
-# These should only be used in conjunction with the %include embed.i
-# library file
-# -----------------------------------------------------------------
-
-#TKINTER = -L/usr/X11R6.3/lib -L/usr/local/compat/lib -ltk4.0 -ltcl7.4 -lX11
-TKINTER =
-PYTHON_LIBOPTS = -lpython2.2 -ldl  $(TKINTER) $(SYSLIBS)
-
-python_static: $(SRCS)
-	$(SWIG) -python -lembed.i $(SWIGOPT) $(INTERFACE)
-	$(CC) $(CFLAGS) -Xlinker -export-dynamic $(ISRCS) $(SRCS) $(INCLUDES) \
-	$(PYTHON_INCLUDE) $(LIBS) -L$(PYTHON_LIB) $(PYTHON_LIBOPTS) -o $(TARGET)
-
-python_static_cpp: $(SRCS)
-	$(SWIG) -c++ -python -lembed.i $(SWIGOPT) $(INTERFACE)
-	$(CXX) $(CFLAGS) $(ICXXSRCS) $(SRCS) $(CXXSRCS) $(INCLUDES) \
-	$(PYTHON_INCLUDE) $(LIBS)  -L$(PYTHON_LIB) $(PYTHON_LIBOPTS) -o $(TARGET)
-
-# -----------------------------------------------------------------
-# Cleaning the python examples
-# -----------------------------------------------------------------
-
-python_clean:
-	rm -f *.o *.so *_wrap* *~ .~* core  mypython *.pyc
-
-##################################################################
-#####                       GUILE                           ######
-##################################################################
-
-# Make sure these locate your Guile installation
-GUILE_INCLUDE = 
-GUILE_LIB     = 
-
-# ----------------------------------------------------------------
-# Build a C dynamically loadable module
-# ----------------------------------------------------------------
-
-guile: $(SRCS)
-	$(SWIG) -guile -Linkage ltdlmod $(SWIGOPT) $(INTERFACE)
-	$(CC) -c $(CCSHARED) $(CFLAGS) $(INCLUDES) $(GUILE_INCLUDE) $(ISRCS) $(SRCS)
-	$(LDSHARED) $(OBJS) $(IOBJS) $(LIBS) -o lib$(TARGET)$(SO)
-
-# -----------------------------------------------------------------
-# Build a C++ dynamically loadable module
-# -----------------------------------------------------------------
-
-guile_cpp: $(SRCS)
-	$(SWIG) -c++ -guile -Linkage ltdlmod $(SWIGOPT) $(INTERFACE)
-	$(CXX) -c $(CCSHARED) $(CFLAGS) $(INCLUDES) $(GUILE_INCLUDE) $(ICXXSRCS) $(SRCS) $(CXXSRCS)
-	$(CXXSHARED) $(OBJS) $(IOBJS) $(LIBS) $(CPP_DLLIBS) -o lib$(TARGET)$(SO)
-
-# -----------------------------------------------------------------
-# Build a dynamically loadable module with passive linkage
-# -----------------------------------------------------------------
-
-guile_passive: $(SRCS)
-	$(SWIG) -guile -Linkage passive $(SWIGOPT) $(INTERFACE)
-	$(CC) -c $(CCSHARED) $(CFLAGS) $(INCLUDES) $(GUILE_INCLUDE) $(ISRCS) $(SRCS)
-	$(LDSHARED) $(OBJS) $(IOBJS) $(LIBS) -o lib$(TARGET)$(SO)
-
-guile_passive_cpp: $(SRCS)
-	$(SWIG) -c++ -guile -Linkage passive $(SWIGOPT) $(INTERFACE)
-	$(CXX) -c $(CCSHARED) $(CFLAGS) $(INCLUDES) $(GUILE_INCLUDE) $(ICXXSRCS) $(SRCS) $(CXXSRCS)
-	$(CXXSHARED) $(OBJS) $(IOBJS) $(LIBS) $(CPP_DLLIBS) -o lib$(TARGET)$(SO)
-
-# -----------------------------------------------------------------
-# Build a dynamically loadable module with passive linkage, 
-# linked against SWIG runtime lib
-# -----------------------------------------------------------------
-
-GUILE_RUNTIME=-L$(RUNTIMEDIR) -lswigguile
-
-guile_passive_multi: $(SRCS)
-	$(SWIG) -c -guile -Linkage passive $(SWIGOPT) $(INTERFACE)
-	$(CC) -c $(CCSHARED) $(CFLAGS) $(INCLUDES) $(GUILE_INCLUDE) $(ISRCS) $(SRCS)
-	$(LDSHARED) $(OBJS) $(IOBJS) $(GUILE_RUNTIME) $(LIBS) -o lib$(TARGET)$(SO)
-
-guile_passive_multi_cpp: $(SRCS)
-	$(SWIG) -c -c++ -guile -Linkage passive $(SWIGOPT) $(INTERFACE)
-	$(CXX) -c $(CCSHARED) $(CFLAGS) $(INCLUDES) $(GUILE_INCLUDE) $(ICXXSRCS) $(SRCS) $(CXXSRCS)
-	$(CXXSHARED) $(OBJS) $(IOBJS) $(GUILE_RUNTIME) $(LIBS) $(CPP_DLLIBS) -o lib$(TARGET)$(SO)
-
-# -----------------------------------------------------------------
-# Build statically linked Guile interpreter
-# -----------------------------------------------------------------
-
-GUILE_LIBOPTS =  -ldl  $(SYSLIBS)
-
-guile_static: $(SRCS)
-	$(SWIG) -guile -lguilemain.i -Linkage ltdlmod $(SWIGOPT) $(INTERFACE)
-	$(CC) $(CFLAGS) $(ISRCS) $(SRCS) $(INCLUDES) \
-	  -DSWIGINIT="SCM scm_init_$(TARGET)_module(void); scm_init_$(TARGET)_module();" \
-	  $(GUILE_INCLUDE) $(LIBS) -L$(GUILE_LIB) $(GUILE_LIBOPTS) -o $(TARGET)-guile
-
-guile_static_cpp: $(SRCS)
-	$(SWIG) -c++ -guile -lguilemain.i -Linkage ltdlmod $(SWIGOPT) $(INTERFACE)
-	$(CXX) $(CFLAGS) $(ICXXSRCS) $(SRCS) $(CXXSRCS) $(INCLUDES) \
-	  -DSWIGINIT="SCM scm_init_$(TARGET)_module(void); scm_init_$(TARGET)_module();" \
-	  $(GUILE_INCLUDE) $(LIBS) -L$(GUILE_LIB) $(GUILE_LIBOPTS) -o $(TARGET)-guile
-
-guile_simple: $(SRCS)
-	$(SWIG) -guile -lguilemain.i -Linkage simple $(SWIGOPT) $(INTERFACE)
-	$(CC) $(CFLAGS) $(ISRCS) $(SRCS) $(INCLUDES) \
-	  $(GUILE_INCLUDE) $(LIBS) -L$(GUILE_LIB) $(GUILE_LIBOPTS) -o $(TARGET)-guile
-
-guile_simple_cpp: $(SRCS)
-	$(SWIG) -c++ -guile -lguilemain.i -Linkage simple $(SWIGOPT) $(INTERFACE)
-	$(CXX) $(CFLAGS) $(ICXXSRCS) $(SRCS) $(CXXSRCS) $(INCLUDES) \
-	  $(GUILE_INCLUDE) $(LIBS) -L$(GUILE_LIB) $(GUILE_LIBOPTS) -o $(TARGET)-guile
-
-# -----------------------------------------------------------------
-# Cleaning the Guile examples
-# -----------------------------------------------------------------
-
-guile_clean:
-	rm -f *.o *.so *_wrap* *~ .~* core  my-guile $(TARGET)
-
-##################################################################
-#####                       JAVA                            ######
-##################################################################
-
-# You need to set this variable to the java directories containing the
-# files "jni.h" and "md.h"
-# usually something like /usr/java/include and /usr/java/include/<arch-osname>.
-JAVA_INCLUDE= 
-
-# Extra Java specific dynamic linking options
-JAVA_DLNK  = 
-JAVALIBPREFIX = lib
-
-# ----------------------------------------------------------------
-# Build a java dynamically loadable module (C)
-# ----------------------------------------------------------------
-
-java: $(SRCS)
-	$(SWIG) -java $(SWIGOPT) $(INTERFACE)
-	$(CC) -c $(CCSHARED) $(CFLAGS) $(SRCS) $(ISRCS) $(INCLUDES) $(JAVA_INCLUDE)
-	$(LDSHARED) $(OBJS) $(IOBJS) $(JAVA_DLNK) $(LIBS) -o $(JAVALIBPREFIX)$(TARGET)$(SO)
-
-# ----------------------------------------------------------------
-# Build a java dynamically loadable module (C++)
-# ----------------------------------------------------------------
-
-java_cpp: $(SRCS)
-	$(SWIG) -java -c++ $(SWIGOPT) $(INTERFACE)
-	$(CXX) -c $(CCSHARED) $(CFLAGS) $(SRCS) $(CXXSRCS) $(ICXXSRCS) $(INCLUDES) $(JAVA_INCLUDE)
-	$(CXXSHARED) $(OBJS) $(IOBJS) $(JAVA_DLNK) $(LIBS) $(CPP_DLLIBS) -o $(JAVALIBPREFIX)$(TARGET)$(SO)
-
-# ----------------------------------------------------------------
-# Build a java dynamically loadable module
-# ----------------------------------------------------------------
-
-java_multi: $(SRCS)
-	$(SWIG) -java $(SWIGOPT) $(INTERFACE)
-	$(CC) -c $(CCSHARED) $(CFLAGS) $(SRCS) $(ISRCS) $(INCLUDES) $(JAVA_INCLUDE)
-	$(LDSHARED) $(OBJS) $(IOBJS) $(JAVA_DLNK) $(LIBS) -o $(JAVALIBPREFIX)$(TARGET)$(SO)
-
-java_multi_cpp: $(SRCS)
-	$(SWIG) -java -c++ $(SWIGOPT) $(INTERFACE)
-	$(CXX) -c $(CCSHARED) $(CFLAGS) $(SRCS) $(CXXSRCS) $(ICXXSRCS) $(INCLUDES) $(JAVA_INCLUDE)
-	$(CXXSHARED) $(OBJS) $(IOBJS) $(JAVA_DLNK) $(LIBS) $(CPP_DLLIBS) -o $(JAVALIBPREFIX)$(TARGET)$(SO)
-
-# -----------------------------------------------------------------
-# Cleaning the java examples
-# -----------------------------------------------------------------
-
-java_clean:
-	rm -f *.o *.so *_wrap* *~ .~* core  *.class `find . -name \*.java | grep -v main.java`
-
-##################################################################
-#####                       MZSCHEME                        ######
-##################################################################
-
-MZC = test -n "" && 
-
-# ----------------------------------------------------------------
-# Build a C/C++ dynamically loadable module
-# ----------------------------------------------------------------
-
-mzscheme: $(SRCS)
-	$(SWIG) -mzscheme $(SWIGOPT) $(INTERFACE)
-	$(MZC) ++ccf "$(INCLUDES)" --cc $(ISRCS) $(SRCS)
-	$(MZC) --ld $(TARGET)$(SO) $(OBJS) $(IOBJS)
-
-mzscheme_cpp: $(SRCS)
-	$(SWIG) -mzscheme -c++ $(SWIGOPT) $(INTERFACE)
-	$(MZC) ++ccf "$(INCLUDES)" --cc $(ICXXSRCS) $(SRCS) $(CXXSRCS)
-	$(MZC) --ld $(TARGET)$(SO) $(OBJS) $(IOBJS) $(CPP_DLLIBS) 
-
-# ----------------------------------------------------------------
-# Build a dynamically loadable module, linked against SWIG runtime
-# ----------------------------------------------------------------
-
-MZSCHEME_RUNTIME=-L$(RUNTIMEDIR) -lswigmz
-
-mzscheme_multi: $(SRCS)
-	$(SWIG) -c -mzscheme $(SWIGOPT) $(INTERFACE)
-	$(MZC) ++ccf "$(INCLUDES)" --cc $(ISRCS) $(SRCS)
-	$(MZC) --ld $(TARGET)$(SO) $(OBJS) $(IOBJS) $(MZSCHEME_RUNTIME)
-
-mzscheme_multi_cpp: $(SRCS)
-	$(SWIG) -c -mzscheme -c++ $(SWIGOPT) $(INTERFACE)
-	$(MZC) ++ccf "$(INCLUDES)" --cc $(ICXXSRCS) $(SRCS) $(CXXSRCS)
-	$(MZC) --ld $(TARGET)$(SO) $(OBJS) $(IOBJS) $(MZSCHEME_RUNTIME) $(CPP_DLLIBS) 
-
-# -----------------------------------------------------------------
-# Cleaning the mzscheme examples
-# -----------------------------------------------------------------
-
-mzscheme_clean:
-	rm -f *.o *.so *_wrap* *~ .~* core 
-
-##################################################################
-#####                          Ocaml                         #####
-##################################################################
-
-OCC=ocamlc
-OCAMLDLGEN=ocamldlgen
-OCAMLFIND=ocamlfind
-OCAMLMKTOP=ocamlmktop
-NOLINK ?= false
-
-ocaml_static: $(SRCS)
-	$(SWIG) -ocaml $(SWIGOPT) $(INTERFACE)
-	$(OCC) -g -c -ccopt -g -ccopt "$(INCLUDES)" $(ISRCS) $(SRCS)
-	$(OCC) -g -c $(INTERFACE:%.i=%.mli)
-	$(OCC) -g -c $(INTERFACE:%.i=%.ml)
-	test -z "$(PROGFILE)" || test -f "$(PROGFILE)" && \
-		$(OCC) -c $(PROGFILE)
-	$(NOLINK) || $(OCC) -g -ccopt -g -cclib -g -custom -o $(TARGET) \
-		$(INTERFACE:%.i=%.cmo) \
-		$(PROGFILE:%.ml=%.cmo) \
-		$(INTERFACE:%.i=%_wrap.o) $(OBJS) -cclib "$(LIBS)"
-
-ocaml_dynamic: $(SRCS)
-	$(SWIG) -ocaml $(SWIGOPT) $(INTERFACE)
-	$(OCC) -g -c -ccopt -g -ccopt "$(INCLUDES)" $(ISRCS) $(SRCS)
-	$(CXXSHARED) $(CCSHARED) $(CFLAGS) -o $(INTERFACE:%.i=%.so) \
-		$(INTERFACE:%.i=%_wrap.o) $(OBJS) $(LIBS)
-	$(OCAMLDLGEN) $(INTERFACE:%.i=%.ml) $(INTERFACE:%.i=%.so) > \
-		$(INTERFACE:%.i=%_dynamic.ml)
-	mv $(INTERFACE:%.i=%_dynamic.ml) $(INTERFACE:%.i=%.ml)
-	rm $(INTERFACE:%.i=%.mli)
-	$(OCAMLFIND) $(OCC) -g -c -package dl $(INTERFACE:%.i=%.ml)
-	test -z "$(PROGFILE)" || test -f "$(PROGFILE)" && \
-		$(OCC) -c $(PROGFILE)
-	$(NOLINK) || $(OCAMLFIND) \
-		$(OCC) -g -ccopt -g -cclib -g -custom -o $(TARGET) \
-		-package dl -linkpkg \
-		$(INTERFACE:%.i=%.cmo) $(PROGFILE:%.ml=%.cmo)
-
-ocaml_static_toplevel: $(SRCS)
-	$(SWIG) -ocaml $(SWIGOPT) $(INTERFACE)
-	$(OCC) -g -c -ccopt -g -ccopt "$(INCLUDES)" $(ISRCS) $(SRCS)
-	$(OCC) -g -c $(INTERFACE:%.i=%.mli)
-	$(OCC) -g -c $(INTERFACE:%.i=%.ml)
-	test -z "$(PROGFILE)" || test -f "$(PROGFILE)" && \
-		$(OCC) -c $(PROGFILE)
-	$(NOLINK) || $(OCAMLMKTOP) \
-		-g -ccopt -g -cclib -g -custom -o $(TARGET)_top \
-		$(INTERFACE:%.i=%.cmo) \
-		$(INTERFACE:%.i=%_wrap.o) $(OBJS) -cclib "$(LIBS)"
-
-ocaml_static_cpp: $(SRCS)
-	$(SWIG) -ocaml -c++ $(SWIGOPT) $(INTERFACE)
-	cp $(ICXXSRCS) $(ICXXSRCS:%.cxx=%.c)
-	$(OCC) -cc '$(CXX)' -g -c -ccopt -g -ccopt "-xc++ $(INCLUDES)" \
-		$(ICXXSRCS:%.cxx=%.c) $(SRCS) $(CXXSRCS)
-	$(OCC) -g -c $(INTERFACE:%.i=%.mli)
-	$(OCC) -g -c $(INTERFACE:%.i=%.ml)
-	test -z "$(PROGFILE)" || test -f "$(PROGFILE)" && \
-		$(OCC) -c $(PROGFILE)
-	$(NOLINK) || $(OCC) -g -ccopt -g -cclib -g -custom -o $(TARGET) \
-		$(INTERFACE:%.i=%.cmo) \
-		$(PROGFILE:%.ml=%.cmo) \
-		$(INTERFACE:%.i=%_wrap.o) $(OBJS) \
-		-cclib "$(LIBS)" -cc '$(CXX)' 
-
-ocaml_static_cpp_toplevel: $(SRCS)
-	$(SWIG) -ocaml -c++ $(SWIGOPT) $(INTERFACE)
-	cp $(ICXXSRCS) $(ICXXSRCS:%.cxx=%.c)
-	$(OCC) -cc '$(CXX)' -g -c -ccopt -g -ccopt "-xc++ $(INCLUDES)" \
-		$(ICXXSRCS:%.cxx=%.c) $(SRCS) $(CXXSRCS)
-	$(OCC) -g -c $(INTERFACE:%.i=%.mli)
-	$(OCC) -g -c $(INTERFACE:%.i=%.ml)
-	test -z "$(PROGFILE)" || test -f "$(PROGFILE)" && \
-		$(OCC) -c $(PROGFILE)
-	$(NOLINK) || $(OCAMLMKTOP) \
-		-g -ccopt -g -cclib -g -custom -o $(TARGET)_top \
-		$(INTERFACE:%.i=%.cmo) \
-		$(INTERFACE:%.i=%_wrap.o) $(OBJS) \
-		-cclib "$(LIBS)" -cc '$(CXX)' 
-
-ocaml_dynamic_cpp: $(SRCS)
-	$(SWIG) -ocaml -c++ $(SWIGOPT) $(INTERFACE)
-	cp $(ICXXSRCS) $(ICXXSRCS:%.cxx=%.c)
-	$(OCC) -cc '$(CXX)' -g -c -ccopt -g -ccopt "-xc++ $(INCLUDES)" \
-		$(ICXXSRCS:%.cxx=%.c) $(SRCS) $(CXXSRCS) -ccopt -fPIC
-	$(CXXSHARED) $(CXXFLAGS) -o $(INTERFACE:%.i=%.so) \
-		$(INTERFACE:%.i=%_wrap.o) $(OBJS) \
-		$(CPP_DLLIBS) $(LIBS)
-	$(OCAMLDLGEN) $(INTERFACE:%.i=%.ml) $(INTERFACE:%.i=%.so) > \
-		$(INTERFACE:%.i=%_dynamic.ml)
-	mv $(INTERFACE:%.i=%_dynamic.ml) $(INTERFACE:%.i=%.ml)
-	rm $(INTERFACE:%.i=%.mli)
-	$(OCAMLFIND) $(OCC) -g -c -package dl $(INTERFACE:%.i=%.ml)
-	test -z "$(PROGFILE)" || test -f "$(PROGFILE)" && \
-		$(OCC) -c $(PROGFILE)
-	$(NOLINK) || $(OCAMLFIND) \
-		$(OCC) -cclib -export-dynamic -g -ccopt -g -cclib -g -custom \
-		-o $(TARGET) \
-		-package dl -linkpkg \
-		$(INTERFACE:%.i=%.cmo) $(PROGFILE:%.ml=%.cmo) -cc '$(CXX)'
-
-ocaml_static_multi_cpp: $(SRCS)
-	$(SWIG) -c -ocaml -c++ $(SWIGOPT) \
-		$(INTERFACE)
-	cp $(ICXXSRCS) $(ICXXSRCS:%.cxx=%.c)
-	$(OCC) -cc '$(CXX)' -g -c -ccopt -g -ccopt "-xc++ $(INCLUDES)" \
-		$(ICXXSRCS:%.cxx=%.c) $(SRCS) $(CXXSRCS)
-	$(OCC) -g -c $(INTERFACE:%.i=%.mli)
-	$(OCC) -g -c $(INTERFACE:%.i=%.ml)
-	test -z "$(PROGFILE)" || test -f "$(PROGFILE)" && \
-		$(OCC) -c $(PROGFILE)
-	$(NOLINK) || $(OCC) -g -ccopt -g -cclib -g -custom -o $(TARGET) \
-		$(INTERFACE:%.i=%.cmo) \
-		$(PROGFILE:%.ml=%.cmo) \
-		$(INTERFACE:%.i=%_wrap.o) -cclib "$(LIBS)" -cc '$(CXX)' 
-
-ocaml_clean:
-	rm -f *.o *.so *_wrap* *~ .~* core  *.cmo *.cmi $(MLFILE) $(MLFILE)i
-
-##################################################################
-#####                       RUBY                            ######
-##################################################################
-
-# Make sure these locate your Ruby installation
-RUBY_CFLAGS=  -DHAVE_CONFIG_H
-RUBY_INCLUDE= -I/usr/local/lib/ruby/1.4/arch
-RUBY_LIB     = /usr/local/lib/ruby/1.4/arch
-RUBY_DLNK = 
-
-# ----------------------------------------------------------------
-# Build a C dynamically loadable module
-# ----------------------------------------------------------------
-
-ruby: $(SRCS)
-	$(SWIG) -ruby $(SWIGOPT) $(INTERFACE)
-	$(CC) -c $(CCSHARED) $(CFLAGS) $(RUBY_CFLAGS) $(ISRCS) $(SRCS) $(INCLUDES) $(RUBY_INCLUDE)
-	$(LDSHARED) $(OBJS) $(IOBJS) $(RUBY_DLNK) $(LIBS) -o $(TARGET)$(SO)
-
-# -----------------------------------------------------------------
-# Build a C++ dynamically loadable module
-# -----------------------------------------------------------------
-
-ruby_cpp: $(SRCS)
-	$(SWIG) -c++ -ruby $(SWIGOPT) $(INTERFACE)
-	$(CXX) -c $(CCSHARED) $(CFLAGS) $(RUBY_CFLAGS) $(ICXXSRCS) $(SRCS) $(CXXSRCS) $(INCLUDES) $(RUBY_INCLUDE)
-	$(CXXSHARED) $(OBJS) $(IOBJS) $(RUBY_DLNK) $(LIBS) $(CPP_DLLIBS) -o $(TARGET)$(SO)
-
-# -----------------------------------------------------------------
-# Build a dynamically loadable module, linked against SWIG runtime lib
-# -----------------------------------------------------------------
-
-RUBY_RUNTIME=-L$(RUNTIMEDIR) -lswigrb
-
-ruby_multi: $(SRCS)
-	$(SWIG) -c -ruby $(SWIGOPT) $(INTERFACE)
-	$(CC) -c $(CCSHARED) $(CFLAGS) $(RUBY_CFLAGS) $(ISRCS) $(SRCS) $(INCLUDES) $(RUBY_INCLUDE)
-	$(LDSHARED) $(OBJS) $(IOBJS) $(RUBY_RUNTIME) $(RUBY_DLNK) $(LIBS) -o $(TARGET)$(SO)
-
-ruby_multi_cpp: $(SRCS)
-	$(SWIG) -c -c++ -ruby $(SWIGOPT) $(INTERFACE)
-	$(CXX) -c $(CCSHARED) $(CFLAGS) $(RUBY_CFLAGS) $(ICXXSRCS) $(SRCS) $(CXXSRCS) $(INCLUDES) $(RUBY_INCLUDE)
-	$(CXXSHARED) $(OBJS) $(IOBJS) $(RUBY_RUNTIME) $(RUBY_DLNK) $(LIBS) $(CPP_DLLIBS) -o $(TARGET)$(SO)
-
-# -----------------------------------------------------------------
-# Build statically linked Ruby interpreter
-#
-# These should only be used in conjunction with the %include embed.i
-# library file
-# -----------------------------------------------------------------
-
-RUBY_LIBOPTS = -lruby -lm -ldl  $(SYSLIBS)
-
-ruby_static: $(SRCS)
-	$(SWIG) -ruby -lembed.i $(SWIGOPT) $(INTERFACE)
-	$(CC) $(CFLAGS) $(RUBY_CFLAGS) -Xlinker -export-dynamic $(ISRCS) $(SRCS) $(INCLUDES) \
-	$(RUBY_INCLUDE) $(LIBS) -L$(RUBY_LIB) $(RUBY_LIBOPTS) -o $(TARGET)
-
-ruby_cpp_static: $(SRCS)
-	$(SWIG) -c++ -ruby -lembed.i $(SWIGOPT) $(INTERFACE)
-	$(CXX) $(CFLAGS) $(RUBY_CFLAGS) $(ICXXSRCS) $(SRCS) $(CXXSRCS) $(INCLUDES) \
-	$(RUBY_INCLUDE) $(LIBS)  -L$(RUBY_LIB) $(RUBY_LIBOPTS) -o $(TARGET)
-
-
-# -----------------------------------------------------------------
-# Cleaning the Ruby examples
-# -----------------------------------------------------------------
-
-ruby_clean:
-	rm -f *.o *.so *_wrap* *~ .~* core  myruby *.pm
-
-##################################################################
-#####                       PHP                             ######
-##################################################################
-
-# -------------------------------------------------------------------
-# Build a PHP4 dynamically loadable module (C)
-# -------------------------------------------------------------------
-
-PHP4_INCLUDE = 
-
-php4: $(SRCS)
-	$(SWIG) -php4 -cppext cxx $(SWIGOPT) $(INTERFACE)
-	$(CC) -c $(CCSHARED) $(CFLAGS) $(SRCS) $(ISRCS) $(INCLUDES) $(PHP4_INCLUDE)
-	$(LDSHARED) $(OBJS) $(IOBJS) $(LIBS) -o $(TARGET)$(SO)
-
-# --------------------------------------------------------------------
-# Build a PHP4 dynamically loadable module (C++)
-# --------------------------------------------------------------------
-
-php4_cpp: $(SRCS)
-	$(SWIG) -php4 -cppext cxx -c++ $(SWIGOPT) $(INTERFACE)
-	$(CXX) -c $(CCSHARED) $(CFLAGS) $(SRCS) $(CXXSRCS) $(ICXXSRCS) $(INCLUDES) $(PHP4_INCLUDE)
-	$(CXXSHARED) $(OBJS) $(IOBJS) $(LIBS) $(CPP_DLLIBS) -o $(TARGET)$(SO)
-
-# ---------------------------------------------------------------------
-# Build a dynamically loadable module, linked against SWIG Runtime lib
-# ---------------------------------------------------------------------
-
-PHP4_RUNTIME=-L$(RUNTIMEDIR) -lswigphp4
-
-php4_multi: $(SRCS)
-	$(SWIG) -c -php4 -cppext cxx $(SWIGOPT) $(INTERFACE)
-	$(CC) -c $(CCSHARED) $(CFLAGS) $(ISRCS) $(SRCS) $(INCLUDES) $(PHP4_INCLUDE)
-	$(LDSHARED) $(OBJS) $(IOBJS) $(PHP4_RUNTIME) $(PHP4_DLNK) $(LIBS) -o $(TARGET)module$(SO)
-
-php4_multi_cpp: $(SRCS)
-	$(SWIG) -c -c++ -php4 -cppext cxx $(SWIGOPT) $(INTERFACE)
-	$(CXX) -c $(CCSHARED) $(CFLAGS) $(ICXXSRCS) $(SRCS) $(CXXSRCS) $(INCLUDES) $(PHP4_INCLUDE)
-	$(CXXSHARED) $(OBJS) $(IOBJS) $(PHP4_RUNTIME) $(PHP4_DLNK) $(LIBS) $(CPP_DLLIBS) -o $(TARGET)module$(SO)
-
-# -----------------------------------------------------------------
-# Cleaning the PHP4 examples
-# -----------------------------------------------------------------
-
-php4_clean:
-	rm -f *.o *$(SO) *_wrap* *~ .~* core  *.php
-
-##################################################################
-#####                       Pike                            ######
-##################################################################
-
-# Make sure these locate your Pike installation
-PIKE_CFLAGS  =  -DHAVE_CONFIG_H
-PIKE_INCLUDE = 
-PIKE_LIB     = @PIKELIB@
-PIKE_DLNK    = 
-
-# ----------------------------------------------------------------
-# Build a C dynamically loadable module
-# ----------------------------------------------------------------
-
-pike: $(SRCS)
-	$(SWIG) -pike $(SWIGOPT) $(INTERFACE)
-	$(CC) -c $(CCSHARED) $(CFLAGS) $(PIKE_CFLAGS) $(ISRCS) $(SRCS) $(INCLUDES) $(PIKE_INCLUDE)
-	$(LDSHARED) $(OBJS) $(IOBJS) $(PIKE_DLNK) $(LIBS) -o $(TARGET)$(SO)
-
-# -----------------------------------------------------------------
-# Build a C++ dynamically loadable module
-# -----------------------------------------------------------------
-
-pike_cpp: $(SRCS)
-	$(SWIG) -c++ -pike $(SWIGOPT) $(INTERFACE)
-	$(CXX) -c $(CCSHARED) $(CFLAGS) $(PIKE_CFLAGS) $(ICXXSRCS) $(SRCS) $(CXXSRCS) $(INCLUDES) $(PIKE_INCLUDE)
-	$(CXXSHARED) $(OBJS) $(IOBJS) $(PIKE_DLNK) $(LIBS) $(CPP_DLLIBS) -o $(TARGET)$(SO)
-
-# -----------------------------------------------------------------
-# Build a dynamically loadable module, linked against SWIG runtime lib
-# -----------------------------------------------------------------
-
-PIKE_RUNTIME=-L$(RUNTIMEDIR) -lswigpike
-
-pike_multi: $(SRCS)
-	$(SWIG) -c -pike $(SWIGOPT) $(INTERFACE)
-	$(CC) -c $(CCSHARED) $(CFLAGS) $(PIKE_CFLAGS) $(ISRCS) $(SRCS) $(INCLUDES) $(PIKE_INCLUDE)
-	$(LDSHARED) $(OBJS) $(IOBJS) $(PIKE_RUNTIME) $(PIKE_DLNK) $(LIBS) -o $(TARGET)$(SO)
-
-pike_multi_cpp: $(SRCS)
-	$(SWIG) -c -c++ -pike $(SWIGOPT) $(INTERFACE)
-	$(CXX) -c $(CCSHARED) $(CFLAGS) $(PIKE_CFLAGS) $(ICXXSRCS) $(SRCS) $(CXXSRCS) $(INCLUDES) $(PIKE_INCLUDE)
-	$(CXXSHARED) $(OBJS) $(IOBJS) $(PIKE_RUNTIME) $(PIKE_DLNK) $(LIBS) $(CPP_DLLIBS) -o $(TARGET)$(SO)
-
-# -----------------------------------------------------------------
-# Build statically linked Pike interpreter
-#
-# These should only be used in conjunction with the %include embed.i
-# library file
-# -----------------------------------------------------------------
-
-PIKE_LIBOPTS = @PIKELINK@ -ldl  $(SYSLIBS)
-
-pike_static: $(SRCS)
-	$(SWIG) -pike -lembed.i $(SWIGOPT) $(INTERFACE)
-	$(CC) $(CFLAGS) $(PIKE_CFLAGS) -Xlinker -export-dynamic $(ISRCS) $(SRCS) $(INCLUDES) \
-	$(PIKE_INCLUDE) $(LIBS) -L$(PIKE_LIB) $(PIKE_LIBOPTS) -o $(TARGET)
-
-pike_cpp_static: $(SRCS)
-	$(SWIG) -c++ -pike -lembed.i $(SWIGOPT) $(INTERFACE)
-	$(CXX) $(CFLAGS) $(PIKE_CFLAGS) $(ICXXSRCS) $(SRCS) $(CXXSRCS) $(INCLUDES) \
-	$(PIKE_INCLUDE) $(LIBS)  -L$(PIKE_LIB) $(PIKE_LIBOPTS) -o $(TARGET)
-
-# -----------------------------------------------------------------
-# Cleaning the Pike examples
-# -----------------------------------------------------------------
-
-pike_clean:
-	rm -f *.o *$(SO) *_wrap* *~ .~* core  mypike 
-
-
-# -----------------------------------------------------------------
-# Compile a CHICKEN Scheme file to C.
-#
-# -----------------------------------------------------------------
-
-CHICKEN_LIBOPTS =   $(SYSLIBS)
-CHICKEN_SHAREDLIBOPTS =   $(SYSLIBS)
-CHICKEN_CFLAGS = 
-CHICKEN_SHAREDCFLAGS = 
-CHICKENOPTS = -optimize-level 3 -quiet
-
-chicken: $(INTERFACE)
-	 $(INTERFACE) $(CHICKENOPTS) -explicit-use \
-		-output-file $(TARGET)
-
-chicken_c:
-	$(SWIG) -chicken $(SWIGOPT) $(INCLUDE) $(INTERFACE)
-
-chicken_cpp:
-	$(SWIG) -c++ -chicken $(SWIGOPT) $(INCLUDE) $(INTERFACE)
-
-compile: $(INTERFACE)
-	$(CC) $(CFLAGS) $(INCLUDE) -c $(INTERFACE) -o $(TARGET)
-
-cxxcompile: $(INTERFACE)
-	$(CXX) $(CFLAGS) $(INCLUDE) -c $(INTERFACE) -o $(TARGET)
-
-chicken_csi:
-	X=`pwd` && cd  && \
-	 /src/csi.scm $(CHICKENOPTS) \
-		-include-path /src \
-		-prologue /src/build.scm \
-		-prelude "(declare (uses posix $(INTERFACE)))" \
-		-output-file $$X/$(TARGET)
-
-chicken_clean:
-	rm -f *.o *.so *_wrap* *~ .~* core  STACKTRACE
-	rm -f *.exe module$(SO)
-
-# -----------------------------------------------------------------
-# Build a CHICKEN dynamically loadable module
-# -----------------------------------------------------------------
-
-chicken_module: $(SRCS) $(CXXSRCS) $(CHICKSRCS)
-	$(CC) -c $(CFLAGS) $(CHICKEN_SHAREDCFLAGS) $(INCLUDE) \
-		$(CHICKEN_INCLUDE) $(CHICKSRCS)
-	test x = "x$(SRCS)" || \
-		$(CC) -c $(CFLAGS) $(CHICKEN_SHAREDCFLAGS) \
-			$(INCLUDE) $(CHICKEN_INCLUDE) \
-			$(ISRCS) $(SRCS)
-	test x = "x$(CXXSRCS)" || \
-		$(CXX) -c $(CFLAGS) $(CHICKEN_SHAREDCFLAGS) \
-			$(INCLUDE) $(CHICKEN_INCLUDE) \
-			$(ICXXSRCS) $(CXXSRCS)
-	$(CXXSHARED) $(SRCS:.c=.o) $(CXXSRCS:.cxx=.o) \
-		$(CHICKSRCS:.c=.o) \
-		$(LIBS) $(CHICKEN_SHAREDLIBOPTS) \
-		-o $(TARGET)$(SO)
-
-# -----------------------------------------------------------------
-# Build statically linked CHICKEN interpreter
-# -----------------------------------------------------------------
-
-chicken_static: csi.c $(SRCS) $(CXXSRCS) $(CHICKSRCS)
-	$(CC) -c $(CFLAGS) $(CHICKEN_CFLAGS) $(INCLUDE) $(CHICKEN_INCLUDE) \
-		csi.c
-	$(CC) -c $(CFLAGS) $(CHICKEN_CFLAGS) $(INCLUDE) \
-		$(CHICKEN_INCLUDE) $(CHICKSRCS)
-	test x = "x$(SRCS)" || \
-		$(CC) -c $(CFLAGS) $(INCLUDE) $(CHICKEN_INCLUDE) \
-			$(CHICKEN_CFLAGS) $(ISRCS) $(SRCS)
-	test x = "x$(CXXSRCS)" || \
-		$(CXX) -c $(CFLAGS) $(INCLUDE) $(CHICKEN_INCLUDE) \
-			$(CHICKEN_CFLAGS) $(ICXXSRCS) $(CXXSRCS)
-	$(CXX) csi.o $(SRCS:.c=.o) $(CXXSRCS:.cxx=.o) \
-		$(CHICKSRCS:.c=.o) \
-		$(LIBS) $(CHICKEN_LIBOPTS) \
-		-o $(TARGET)
-
-##################################################################
-#####                      CSHARP                           ######
-##################################################################
-
-# Extra CSharp specific dynamic linking options
-CSHARP_DLNK  = 
-CSHARPLIBPREFIX = lib
-CSHARPCOMPILER = 
-CSHARPCILINTERPRETER = 
-
-# ----------------------------------------------------------------
-# Build a CSharp dynamically loadable module (C)
-# ----------------------------------------------------------------
-
-csharp: $(SRCS)
-	$(SWIG) -csharp $(SWIGOPT) $(INTERFACE)
-	$(CC) -c $(CCSHARED) $(CFLAGS) $(SRCS) $(ISRCS) $(INCLUDES)
-	$(LDSHARED) $(OBJS) $(IOBJS) $(CSHARP_DLNK) $(LIBS) -o $(CSHARPLIBPREFIX)$(TARGET)$(SO)
-
-# ----------------------------------------------------------------
-# Build a CSharp dynamically loadable module (C++)
-# ----------------------------------------------------------------
-
-csharp_cpp: $(SRCS)
-	$(SWIG) -csharp -c++ $(SWIGOPT) $(INTERFACE)
-	$(CXX) -c $(CCSHARED) $(CFLAGS) $(SRCS) $(CXXSRCS) $(ICXXSRCS) $(INCLUDES)
-	$(CXXSHARED) $(OBJS) $(IOBJS) $(CSHARP_DLNK) $(LIBS) $(CPP_DLLIBS) -o $(CSHARPLIBPREFIX)$(TARGET)$(SO)
-
-# ----------------------------------------------------------------
-# Build a CSharp dynamically loadable module
-# ----------------------------------------------------------------
-
-csharp_multi: $(SRCS)
-	$(SWIG) -csharp $(SWIGOPT) $(INTERFACE)
-	$(CC) -c $(CCSHARED) $(CFLAGS) $(SRCS) $(ISRCS) $(INCLUDES)
-	$(LDSHARED) $(OBJS) $(IOBJS) $(CSHARP_DLNK) $(LIBS) -o $(CSHARPLIBPREFIX)$(TARGET)$(SO)
-
-csharp_multi_cpp: $(SRCS)
-	$(SWIG) -csharp -c++ $(SWIGOPT) $(INTERFACE)
-	$(CXX) -c $(CCSHARED) $(CFLAGS) $(SRCS) $(CXXSRCS) $(ICXXSRCS) $(INCLUDES)
-	$(CXXSHARED) $(OBJS) $(IOBJS) $(CSHARP_DLNK) $(LIBS) $(CPP_DLLIBS) -o $(CSHARPLIBPREFIX)$(TARGET)$(SO)
-
-# ----------------------------------------------------------------
-# Compile CSharp files
-# ----------------------------------------------------------------
-
-csharp_compile: $(SRCS)
-	$(CSHARPCOMPILER) $(CSHARPFLAGS) $(CSHARPSRCS)
-
-# -----------------------------------------------------------------
-# Cleaning the CSharp examples
-# -----------------------------------------------------------------
-
-csharp_clean:
-	rm -f *.o *.dll *_wrap* *~ .~* core  runme gc.log `find . -name \*.cs | grep -v runme.cs`
+hdfext_wrap.c: hdfext.py
+	# Already generated by swig. Do nothing.
 
+.PHONY: clean
+clean:
+	rm -rf __pycache__ *.so *.pyc


=====================================
pyhdf/SD.py
=====================================
@@ -41,7 +41,6 @@ SD (scientific dataset) API (:mod:`pyhdf.SD`)
 
 A module of the pyhdf package implementing the SD (scientific
 dataset) API of the NCSA HDF4 library.
-(see: hdf.ncsa.uiuc.edu)
 
 Introduction
 ------------
@@ -152,7 +151,7 @@ work.
     be installed separately.
 
     HDF is available at:
-    "http://hdf.ncsa.uiuc.edu/obtain.html".
+    "https://portal.hdfgroup.org/display/support/Download+HDF4".
 
   HDF4.2r1 in turn relies on the following packages :
 


=====================================
pyhdf/V.py
=====================================
@@ -13,7 +13,6 @@ V (Vgroup) API (:mod:`pyhdf.V`)
 
 A module of the pyhdf package implementing the V (Vgroup)
 API of the NCSA HDF4 library.
-(see: hdf.ncsa.uiuc.edu)
 
 Introduction
 ------------
@@ -124,7 +123,7 @@ work.
     be installed separately.
 
     HDF is available at:
-    "http://hdf.ncsa.uiuc.edu/obtain.html".
+    "https://portal.hdfgroup.org/display/support/Download+HDF4".
 
 Numeric is also needed by the SD module. See the SD module documentation.
 


=====================================
pyhdf/VS.py
=====================================
@@ -16,7 +16,6 @@ VS (Vdata table) API (:mod:`pyhdf.VS`)
 
 A module of the pyhdf package implementing the VS (Vdata table)
 API of the NCSA HDF4 library.
-(see: hdf.ncsa.uiuc.edu)
 
 Introduction
 ------------
@@ -159,7 +158,7 @@ work.
     be installed separately.
 
     HDF is available at:
-    "http://hdf.ncsa.uiuc.edu/obtain.html".
+    "https://portal.hdfgroup.org/display/support/Download+HDF4".
 
 Numeric is also needed by the SD module. See the SD module documentation.
 


=====================================
pyhdf/test_SD.py
=====================================
@@ -3,6 +3,7 @@
 import numpy as np
 import os
 import pyhdf.SD
+import shutil
 import tempfile
 from nose.tools import eq_
 from numpy.testing import assert_array_equal
@@ -11,8 +12,10 @@ from pyhdf.SD import SDC
 def test_long_varname():
     sds_name = 'a'*255
 
-    _, path = tempfile.mkstemp(suffix='.hdf', prefix='pyhdf_')
+    temp = tempfile.mkdtemp(prefix='pyhdf_')
     try:
+        path = os.path.join(temp, "test.hdf")
+
         # create a file with a long variable name
         sd = pyhdf.SD.SD(path, SDC.WRITE|SDC.CREATE|SDC.TRUNC)
         sds = sd.create(sds_name, SDC.FLOAT32, (3,))
@@ -28,11 +31,13 @@ def test_long_varname():
         sd.end()
         eq_(sds_name, name)
     finally:
-        os.unlink(path)
+        shutil.rmtree(temp)
 
 def test_negative_int8():
-    _, path = tempfile.mkstemp(suffix='.hdf', prefix='pyhdf_')
+    temp = tempfile.mkdtemp(prefix='pyhdf_')
     try:
+        path = os.path.join(temp, "test.hdf")
+
         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)
@@ -56,4 +61,4 @@ def test_negative_int8():
         sds[:,:] = -40
         sd.end()
     finally:
-        os.unlink(path)
+        shutil.rmtree(temp)


=====================================
runexamples.sh deleted
=====================================
@@ -1,34 +0,0 @@
-#!/bin/sh
-
-set -ev
-
-if [ -z "$PYTHON" ]; then
-	PYTHON=python
-fi
-
-$PYTHON setup.py build_ext --inplace
-export PYTHONPATH=$(pwd)
-echo PYTHONPATH is $PYTHONPATH
-
-cd examples/compress/
-$PYTHON ./test-compress.py >/dev/null
-
-cd ../vgroup/
-$PYTHON ./vgwrite.py
-$PYTHON ./vgread.py inventory.hdf >/dev/null
-
-cd ../inventory
-$PYTHON ./inventory_1-1.py
-$PYTHON ./inventory_1-2.py
-$PYTHON ./inventory_1-3.py
-$PYTHON ./inventory_1-4.py >/dev/null
-$PYTHON ./inventory_1-5.py >/dev/null
-
-cd ../txttohdf
-$PYTHON ./txttohdf.py
-
-cd ../hdfstruct
-for f in `find .. -name '*.hdf'`; do
-	echo running hdfstruct.py $f
-	$PYTHON ./hdfstruct.py $f >/dev/null
-done


=====================================
setup.py
=====================================
@@ -1,13 +1,11 @@
 #!/usr/bin/env python
-"""Python-HDF4: Python interface to the NCSA HDF4 library.
+"""pyhdf: Python interface to the NCSA HDF4 library.
 
-The Python-HDF4 package wraps the functionality of the NCSA HDF version
+The pyhdf package wraps the functionality of the NCSA HDF version
 4 library inside a Python OOP framework. The SD (scientific dataset),
 VS (Vdata) and V (Vgroup) APIs are currently implemented.  SD datasets
 are read/written through numpy arrays. NetCDF files can also be read
-and modified with Python-HDF4.
-
-This package is a fork of pyhdf (http://pysclint.sourceforge.net/pyhdf/).
+and modified with pyhdf.
 """
 
 from __future__ import print_function
@@ -94,38 +92,6 @@ if sys.platform.startswith('linux'):
     if not include_dirs and os.path.exists(d):
         include_dirs.append(d)
 
-if sys.platform == 'win32':
-    try:
-        k = sys.argv.index('--hdf4')
-        baseloc = sys.argv[k+1]
-        del sys.argv[k]
-        del sys.argv[k]
-    except (ValueError, IndexError):
-        baseloc = None
-    if not baseloc:
-        baseloc = os.environ.get('HDF4', None)
-    if baseloc:
-        # fix include_dirs and library_dirs
-        #  based on fixed set of paths
-        if not path.exists(baseloc):
-            print("\n******\n%s not found\n******\n\n" % baseloc)
-            raise RuntimeError(msg)
-        if not path.isdir(baseloc):
-            print("\n******\n%s not a directory \n******\n\n" % baseloc)
-            raise RuntimeError(msg)
-        alldirs = os.listdir(baseloc)
-        include_dirs = []
-        library_dirs = []
-        for adir in alldirs:
-            if not path.isdir(path.sep.join([baseloc, adir])):
-                continue
-            if adir.startswith('42'):
-                include_dirs.append(path.sep.join([baseloc, adir, 'include']))
-                library_dirs.append(path.sep.join([baseloc, adir, 'dll']))
-            library_dirs.append(path.sep.join([baseloc, adir, 'lib']))
-        print("Using include_dirs = ", include_dirs)
-        print("Using library_dirs = ", library_dirs)
-
 for p in include_dirs + library_dirs:
     if not path.exists(p):
         print("\n******\n%s not found\n******\n\n" % p)
@@ -135,14 +101,15 @@ if sys.platform == 'win32':
     # Find DLL path
     dll_path = ''
     for p in library_dirs:
-        if path.exists(p + os.path.sep + "HM423M.DLL"):
+        if path.exists(p + os.path.sep + "mfhdf.dll"):
             dll_path = p + os.path.sep
             break
     if dll_path == '':
+        print("library_dirs =", library_dirs)
         raise RuntimeError("Cannot find required HDF4 DLLs -- check LIBRARY_DIRS")
 
 if sys.platform == 'win32':
-    libraries = ["hm423m", "hd423m", "xdr_for_dll" ]
+    libraries = ["mfhdf", "hdf", "xdr" ]
 elif _use_hdf4alt(library_dirs):
     libraries = ["mfhdfalt", "dfalt"]
 else:
@@ -174,20 +141,19 @@ _hdfext = Extension('pyhdf._hdfext',
                     )
 
 if sys.platform == 'win32':
-    data_files = [("pyhdf", [dll_path + x for x in ["HM423M.DLL", "HD423M.DLL"]])]
+    data_files = [("pyhdf", [dll_path + x for x in ["mfhdf.dll", "hdf.dll"]])]
 else:
     data_files = []
 
-setup(name         = 'python-hdf4',
-      maintainer       = 'python-hdf4 authors',
-      maintainer_email = 'fshahriar at gmail.com',
+setup(name         = 'pyhdf',
+      maintainer       = 'pyhdf authors',
       author       = 'Andre Gosselin et al.',
       description  = DOCLINES[0],
       keywords     = ['hdf4', 'netcdf', 'numpy', 'python', 'pyhdf'],
       license      = 'MIT',
       long_description = "\n".join(DOCLINES[2:]),
-      url          = 'https://github.com/fhs/python-hdf4',
-      version      = '0.9.2',
+      url          = 'https://github.com/fhs/pyhdf',
+      version      = '0.10.1',
       packages     = ['pyhdf'],
       ext_modules  = [_hdfext],
       data_files   = data_files,



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

-- 
View it on GitLab: https://salsa.debian.org/debian-gis-team/python-hdf4/commit/38b210697811e10e730466ac59edf0be4beef22d
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/20190710/ab2f02f1/attachment-0001.html>


More information about the Pkg-grass-devel mailing list