diff --git a/LICENSE b/LICENSE index 781ff6f..0426e5e 100644 --- a/LICENSE +++ b/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 diff --git a/README.md b/README.md new file mode 100644 index 0000000..95b46a6 --- /dev/null +++ b/README.md @@ -0,0 +1,39 @@ +[![Build Status](https://travis-ci.org/fhs/pyhdf.svg?branch=master)](https://travis-ci.org/fhs/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 onwards, please install `pyhdf` instead of `python-hdf4`. + +## Installation + +To install, see http://fhs.github.io/pyhdf/install.html +or file [doc/install.rst](doc/install.rst). + +## Documentation + +For documentation, see http://fhs.github.io/pyhdf/ + +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. diff --git a/README.rst b/README.rst deleted file mode 100644 index f84e0a5..0000000 --- a/README.rst +++ /dev/null @@ -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/pyhdf/install.html -or file `doc/install.rst `_. - -Documentation -============= - -For documentation, see http://fhs.github.io/pyhdf/ - -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. diff --git a/doc/Makefile b/doc/Makefile index 0efcd4c..9413103 100644 --- a/doc/Makefile +++ b/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: diff --git a/doc/conf.py b/doc/conf.py index 71cce25..e7525a2 100644 --- a/doc/conf.py +++ b/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,8 +46,8 @@ 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 @@ -179,7 +179,7 @@ #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 @@ # (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 @@ # 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 @@ # (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'), ] diff --git a/doc/index.rst b/doc/index.rst index 198a245..b2bc078 100644 --- a/doc/index.rst +++ b/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 `_. Development for this library happens in github: -https://github.com/fhs/python-hdf4/ +https://github.com/fhs/pyhdf/ Contents: diff --git a/doc/install.rst b/doc/install.rst index 1b5b0dc..daeed20 100644 --- a/doc/install.rst +++ b/doc/install.rst @@ -2,21 +2,21 @@ 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 +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/python-hdf4 -* Github: https://github.com/fhs/python-hdf4/releases +* 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 `_: Python 2.6 or newer for Python 2, or Python 3.2 or newer for Python 3. @@ -40,10 +40,10 @@ OS X users can obtain jpeg libraries `here Installing from the Cheeseshop ------------------------------ -To install Python-HDF4 from The Python Package Index (Cheeseshop), open a +To install pyhdf from The Python Package Index (Cheeseshop), open a command prompt and type:: - pip install python-hdf4 + pip install pyhdf On Debian based systems, you can obtain the ``pip`` command by running:: @@ -53,7 +53,7 @@ On Debian based systems, you can obtain the ``pip`` command by running:: 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 @@ -113,8 +113,8 @@ 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 + pyhdf. There are two binary packages to choose from depending on + whether or not you want to compile pyhdf with SZIP encoding enabled or disabled. There are different licensing implications for each choice (see `the HDF page `_ for more details on the @@ -125,7 +125,7 @@ Quick install for Windows Users 2. Unzip the selected package into a directory of your choice (e.g. ``C:\HDF4``). -3. Go to the Python-HDF4 source directory. +3. Go to the pyhdf source directory. 4. Build the package in one of the two following ways: @@ -142,7 +142,7 @@ Quick install for Windows Users 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, +5. To install pyhdf or build a binary distribution (bdist_msi, bdist_wininst, bdist_egg, etc.), run one of the following commands:: python setup.py install diff --git a/doc/make.bat b/doc/make.bat index 520958c..c11f206 100644 --- a/doc/make.bat +++ b/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 ) diff --git a/setup.py b/setup.py index d1f5257..f8efb83 100644 --- a/setup.py +++ b/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 @@ -178,15 +176,15 @@ def _use_hdf4alt(libdirs): else: data_files = [] -setup(name = 'python-hdf4', - maintainer = 'python-hdf4 authors', +setup(name = 'pyhdf', + maintainer = 'pyhdf authors', maintainer_email = 'fshahriar@gmail.com', 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', + url = 'https://github.com/fhs/pyhdf', version = '0.9.2', packages = ['pyhdf'], ext_modules = [_hdfext],