h5py-2.10.0/ 0000775 0001750 0001750 00000000000 13534561112 013652 5 ustar scopatz scopatz 0000000 0000000 h5py-2.10.0/ANN.rst 0000664 0001750 0001750 00000003434 13534547675 015046 0 ustar scopatz scopatz 0000000 0000000 Announcing HDF5 for Python (h5py) 2.5.0
========================================
The h5py team is happy to announce the availability of h5py 2.5.0.
This release introduces experimental support for the highly-anticipated
"Single Writer Multiple Reader" (SWMR) feature in the upcoming HDF5 1.10
release. SWMR allows sharing of a single HDF5 file between multiple processes
without the complexity of MPI or multiprocessing-based solutions.
This is an experimental feature that should NOT be used in production code.
We are interested in getting feedback from the broader community with respect
to performance and the API design.
For more details, check out the h5py user guide:
http://docs.h5py.org/en/latest/swmr.html
SWMR support was contributed by Ulrik Pedersen.
What's h5py?
------------
The h5py package is a Pythonic interface to the HDF5 binary data format.
It lets you store huge amounts of numerical data, and easily manipulate
that data from NumPy. For example, you can slice into multi-terabyte
datasets stored on disk, as if they were real NumPy arrays. Thousands of
datasets can be stored in a single file, categorized and tagged however
you want.
Documentation is at:
http://docs.h5py.org
Changes
-------
* Experimental SWMR support
* Group and AttributeManager classes now inherit from the appropriate ABCs
* Fixed an issue with 64-bit float VLENS
* Cython warning cleanups related to "const"
* Entire code base ported to "six"; 2to3 removed from setup.py
Acknowledgements
----------------
This release incorporates changes from, among others:
* Ulrik Pedersen
* James Tocknell
* Will Parkin
* Antony Lee
* Peter H. Li
* Peter Colberg
* Ghislain Antony Vaillant
Where to get it
---------------
Downloads, documentation, and more are available at the h5py website:
http://www.h5py.org
h5py-2.10.0/AUTHORS 0000664 0001750 0001750 00000003645 13534561103 014732 0 ustar scopatz scopatz 0000000 0000000 All of the people who have made at least one contribution to h5py.
Authors are sorted by number of commits.
* Andrew Collette
* Thomas A Caswell
* James Tocknell
* Thomas Kluyver
* Андрей Парамонов
* Darren Dale
* Aleksandar Jelenak
* Valentin Valls
* Ulrik Kofoed Pedersen
* Martin Raspaud
* Anthony Scopatz
* John Kirkham
* Aaron Parsons
* Lawrence Chan
* Andrey Paramonov
* Liu JiaLin
* lhole
* Ghislain Antony Vaillant
* Yu Feng
* Seth R Johnson
* Matthieu Brucher
* Andrea Bedini
* Martin Teichmann
* Stan West
* Axel Huebl
* Pierre de Buyl
* Florian Rathgeber
* Chris Billington
* Thomas VINCENT
* Max Dietz
* Konrad Hinsen
* Toon Verstraelen
* Jerome Kieffer
* Markus Gerstel
* Machine User
* Geoff Wright
* Kit Choi
* lucasb-eyer
* Matthew Brett
* Dylan Nelson
* Scott Sanderson
* Antony Lee
* Matt Zwier
* Charles Law
* Chen Yufei
* Simon Mutch
* Christian Sachs
* ebner
* Sajid Ali
* Noel Dawe
* John Tyree
* Christoph Gohlke
* Carlos Pascual
* Joe Jevnik
* unknown
* Jason Newton
* Will Parkin
* Devin
* Nathan Goldbaum
* paulmueller
* Hameer Abbasi
* Andy Salnikov
* amcnicho
* Jonah Bernhard
* Antoine Pitrou
* Joseph Kleinhenz
* cclauss
* Colin Gavin
* Chris Meyer
* Jakob Lombacher
* Michael Boyle
* Sam Mason
* Peter H. Li
* jialin
* joydeep bhattacharjee
* pharshalp
* Matthias Geier
* Eric Larson
* Drew Parsons
* Robert David Grant
* JP Dehollain
* chrisjbillington
* Lars Viklund
* Dan Guest
* root
* bpinsard
* Barry Wardel
* Evan Wright
* Johannes Meixner
* Marc Abramowitz
* syhw
* Stuart Berg
* Michael V. DePalatis
* Kwat
* Mike Boyle
* Peter Chang
* Mikhail
* Nils Werner
* Peter Hill
* John Benediktsson
* Yuri D'Elia
* Matthew Turk
* Bradley M. Froehle
* Dan Meliza
* Artem Sanakoev
* Matthias König
* Adam J. Stewart
* Kyle Sunden
* Caleb Morse
* Peter Colberg
* James Clarke
* Sam Toyer
* Joe Zuntz
* Greg Allen
* Lawrence Mitchell
* dkriegner
* Jens Timmerman
* Niru Maheswaranathan
* Paco Hope
* Felix Yan
h5py-2.10.0/LICENSE 0000664 0001750 0001750 00000002760 13534547675 014706 0 ustar scopatz scopatz 0000000 0000000 Copyright (c) 2008 Andrew Collette and contributors
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the
distribution.
3. Neither the name of the copyright holder nor the names of its
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
h5py-2.10.0/MANIFEST.in 0000664 0001750 0001750 00000001525 13534550215 015415 0 ustar scopatz scopatz 0000000 0000000 include ANN.rst
include AUTHORS
include api_gen.py
include LICENSE
include MANIFEST.in
include pylintrc
include README.rst
include setup_build.py
include setup_configure.py
include tox.ini
include pytest.ini
recursive-include docs *
prune docs/_build
recursive-include docs_api *
prune docs_api/_build
recursive-include examples *.py
recursive-include h5py *.h *.pyx *.pxd *.pxi *.py *.txt
exclude h5py/config.pxi
exclude h5py/defs.pxd
exclude h5py/defs.pyx
recursive-include licenses *
recursive-include lzf *
recursive-include windows *
recursive-exclude * .DS_Store
exclude ci other .github
recursive-exclude ci *
recursive-exclude other *
recursive-exclude .github *
exclude pavement.py
exclude *.yml
exclude *.yaml
recursive-exclude * __pycache__
recursive-exclude * *.py[co]
exclude .coveragerc
exclude .mailmap
exclude rever.xsh
prune news
h5py-2.10.0/PKG-INFO 0000664 0001750 0001750 00000004046 13534561112 014753 0 ustar scopatz scopatz 0000000 0000000 Metadata-Version: 1.2
Name: h5py
Version: 2.10.0
Summary: Read and write HDF5 files from Python
Home-page: http://www.h5py.org
Author: Andrew Collette
Author-email: andrew.collette@gmail.com
Maintainer: Andrew Collette
Maintainer-email: andrew.collette@gmail.com
License: BSD
Download-URL: https://pypi.python.org/pypi/h5py
Description:
The h5py package provides both a high- and low-level interface to the HDF5
library from Python. The low-level interface is intended to be a complete
wrapping of the HDF5 API, while the high-level component supports access to
HDF5 files, datasets and groups using established Python and NumPy concepts.
A strong emphasis on automatic conversion between Python (Numpy) datatypes and
data structures and their HDF5 equivalents vastly simplifies the process of
reading and writing data from Python.
Supports HDF5 versions 1.8.4 and higher. On Windows, HDF5 is included with
the installer.
Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Information Technology
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: BSD License
Classifier: Programming Language :: Cython
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 2
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Topic :: Scientific/Engineering
Classifier: Topic :: Database
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Operating System :: Unix
Classifier: Operating System :: POSIX :: Linux
Classifier: Operating System :: MacOS :: MacOS X
Classifier: Operating System :: Microsoft :: Windows
h5py-2.10.0/README.rst 0000664 0001750 0001750 00000002741 13534547675 015367 0 ustar scopatz scopatz 0000000 0000000 .. image:: https://travis-ci.org/h5py/h5py.png
:target: https://travis-ci.org/h5py/h5py
.. image:: https://ci.appveyor.com/api/projects/status/h3iajp4d1myotprc/branch/master?svg=true
:target: https://ci.appveyor.com/project/h5py/h5py/branch/master
HDF5 for Python
===============
`h5py` is a thin, pythonic wrapper around the `HDF5 `_, which runs on Python 2.7, and Python 3 (3.4+).
Websites
--------
* Main website: http://www.h5py.org
* Source code: http://github.com/h5py/h5py
* Mailing list: https://groups.google.com/d/forum/h5py
Installation
------------
Pre-build `h5py` can either be installed via your Python Distribution (e.g.
`Continuum Anaconda`_, `Enthought Canopy`_) or from `PyPI`_ via `pip`_.
`h5py` is also distributed in many Linux Distributions (e.g. Ubuntu, Fedora),
and in the MacOS package managers `Homebrew `_,
`Macports `_, or `Fink `_.
More detailed installation instructions, including how to install `h5py` with
MPI support, can be found at: http://docs.h5py.org/en/latest/build.html.
Reporting bugs
--------------
Open a bug at http://github.com/h5py/h5py/issues. For general questions, ask
on the list (https://groups.google.com/d/forum/h5py).
.. _`Continuum Anaconda`: http://continuum.io/downloads
.. _`Enthought Canopy`: https://www.enthought.com/products/canopy/
.. _`PyPI`: https://pypi.org/project/h5py/
.. _`pip`: https://pip.pypa.io/en/stable/
h5py-2.10.0/api_gen.py 0000664 0001750 0001750 00000017426 13534547675 015662 0 ustar scopatz scopatz 0000000 0000000
"""
Generate the lowest-level Cython bindings to HDF5.
In order to translate HDF5 errors to exceptions, the raw HDF5 API is
wrapped with Cython "error wrappers". These are cdef functions with
the same names and signatures as their HDF5 equivalents, but implemented
in the h5py.defs extension module.
The h5py.defs files (defs.pyx and defs.pxd), along with the "real" HDF5
function definitions (_hdf5.pxd), are auto-generated by this script from
api_functions.txt. This file also contains annotations which indicate
whether a function requires a certain minimum version of HDF5, an
MPI-aware build of h5py, or special error handling.
This script is called automatically by the h5py build system when the
output files are missing, or api_functions.txt has been updated.
See the Line class in this module for documentation of the format for
api_functions.txt.
h5py/_hdf5.pxd: Cython "extern" definitions for HDF5 functions
h5py/defs.pxd: Cython definitions for error wrappers
h5py/defs.pyx: Cython implementations of error wrappers
"""
import re
import os.path as op
class Line(object):
"""
Represents one line from the api_functions.txt file.
Exists to provide the following attributes:
mpi: Bool indicating if MPI required
error: Bool indicating if special error handling required
version: None or a minimum-version tuple
code: String with function return type
fname: String with function name
sig: String with raw function signature
args: String with sequence of arguments to call function
Example: MPI ERROR 1.8.12 int foo(char* a, size_t b)
.mpi: True
.error: True
.version: (1, 8, 12)
.code: "int"
.fname: "foo"
.sig: "char* a, size_t b"
.args: "a, b"
"""
PATTERN = re.compile("""(?P(MPI)[ ]+)?
(?P(ERROR)[ ]+)?
(?P([0-9]+\.[0-9]+\.[0-9]+))?
([ ]+)?
(?P(unsigned[ ]+)?[a-zA-Z_]+[a-zA-Z0-9_]*\**)[ ]+
(?P[a-zA-Z_]+[a-zA-Z0-9_]*)[ ]*
\((?P[a-zA-Z0-9_,* ]*)\)
""", re.VERBOSE)
SIG_PATTERN = re.compile("""
(?:unsigned[ ]+)?
(?:[a-zA-Z_]+[a-zA-Z0-9_]*\**)
[ ]+[ *]*
(?P[a-zA-Z_]+[a-zA-Z0-9_]*)
""", re.VERBOSE)
def __init__(self, text):
""" Break the line into pieces and populate object attributes.
text: A valid function line, with leading/trailing whitespace stripped.
"""
m = self.PATTERN.match(text)
if m is None:
raise ValueError("Invalid line encountered: {0}".format(text))
parts = m.groupdict()
self.mpi = parts['mpi'] is not None
self.error = parts['error'] is not None
self.version = parts['version']
if self.version is not None:
self.version = tuple(int(x) for x in self.version.split('.'))
self.code = parts['code']
self.fname = parts['fname']
self.sig = parts['sig']
sig_const_stripped = self.sig.replace('const', '')
self.args = self.SIG_PATTERN.findall(sig_const_stripped)
if self.args is None:
raise ValueError("Invalid function signature: {0}".format(self.sig))
self.args = ", ".join(self.args)
raw_preamble = """\
include "config.pxi"
from api_types_hdf5 cimport *
from api_types_ext cimport *
"""
def_preamble = """\
include "config.pxi"
from api_types_hdf5 cimport *
from api_types_ext cimport *
"""
imp_preamble = """\
include "config.pxi"
from api_types_ext cimport *
from api_types_hdf5 cimport *
cimport _hdf5
from _errors cimport set_exception
"""
class LineProcessor(object):
def run(self):
# Function definitions file
self.functions = open(op.join('h5py', 'api_functions.txt'), 'r')
# Create output files
self.raw_defs = open(op.join('h5py', '_hdf5.pxd'), 'w')
self.cython_defs = open(op.join('h5py', 'defs.pxd'), 'w')
self.cython_imp = open(op.join('h5py', 'defs.pyx'), 'w')
self.raw_defs.write(raw_preamble)
self.cython_defs.write(def_preamble)
self.cython_imp.write(imp_preamble)
for text in self.functions:
# Directive specifying a header file
if not text.startswith(' ') and not text.startswith('#') and \
len(text.strip()) > 0:
inc = text.split(':')[0]
self.raw_defs.write('cdef extern from "%s.h":\n' % inc)
continue
text = text.strip()
# Whitespace or comment line
if len(text) == 0 or text[0] == '#':
continue
# Valid function line
self.line = Line(text)
self.write_raw_sig()
self.write_cython_sig()
self.write_cython_imp()
self.functions.close()
self.cython_imp.close()
self.cython_defs.close()
self.raw_defs.close()
def add_cython_if(self, block):
""" Wrap a block of code in the required "IF" checks """
def wrapif(condition, code):
code = code.replace('\n', '\n ', code.count('\n')-1) # Yes, -1.
code = "IF {0}:\n {1}".format(condition, code)
return code
if self.line.mpi:
block = wrapif('MPI', block)
if self.line.version is not None:
block = wrapif('HDF5_VERSION >= {0.version}'.format(self.line), block)
return block
def write_raw_sig(self):
""" Write out "cdef extern"-style definition for an HDF5 function """
raw_sig = "{0.code} {0.fname}({0.sig}) except *\n".format(self.line)
raw_sig = self.add_cython_if(raw_sig)
raw_sig = "\n".join((" "+x if x.strip() else x) for x in raw_sig.split("\n"))
self.raw_defs.write(raw_sig)
def write_cython_sig(self):
""" Write out Cython signature for wrapper function """
cython_sig = "cdef {0.code} {0.fname}({0.sig}) except *\n".format(self.line)
cython_sig = self.add_cython_if(cython_sig)
self.cython_defs.write(cython_sig)
def write_cython_imp(self):
""" Write out Cython wrapper implementation """
# Figure out what test and return value to use with error reporting
if '*' in self.line.code or self.line.code in ('H5T_conv_t',):
condition = "==NULL"
retval = "NULL"
elif self.line.code in ('int', 'herr_t', 'htri_t', 'hid_t','hssize_t','ssize_t') \
or re.match(r'H5[A-Z]+_[a-zA-Z_]+_t', self.line.code):
condition = "<0"
retval = "-1"
elif self.line.code in ('unsigned int','haddr_t','hsize_t','size_t'):
condition = "==0"
retval = 0
else:
raise ValueError("Return code <<%s>> unknown" % self.line.code)
# Have to use except * because Cython can't handle special types here
imp = """\
cdef {0.code} {0.fname}({0.sig}) except *:
cdef {0.code} r
_hdf5.H5Eset_auto(NULL, NULL)
r = _hdf5.{0.fname}({0.args})
if r{condition}:
if set_exception():
return <{0.code}>{retval}
elif {0.error}:
raise RuntimeError("Unspecified error in {0.fname} (return value {condition})")
return r
"""
imp = imp.format(self.line, condition=condition, retval=retval)
imp = self.add_cython_if(imp)
self.cython_imp.write(imp)
def run():
lp = LineProcessor()
lp.run()
if __name__ == '__main__':
run()
h5py-2.10.0/docs/ 0000775 0001750 0001750 00000000000 13534561112 014602 5 ustar scopatz scopatz 0000000 0000000 h5py-2.10.0/docs/Makefile 0000664 0001750 0001750 00000015145 13534547675 016272 0 ustar scopatz scopatz 0000000 0000000 # Makefile for Sphinx documentation
#
# You can set these variables from the command line.
SPHINXOPTS = -W
SPHINXBUILD = sphinx-build
PAPER =
BUILDDIR = _build
# User-friendly check for sphinx-build
ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1)
$(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from http://sphinx-doc.org/)
endif
# Internal variables.
PAPEROPT_a4 = -D latex_paper_size=a4
PAPEROPT_letter = -D latex_paper_size=letter
ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
# the i18n builder cannot share the environment and doctrees with the others
I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext
help:
@echo "Please use \`make ' where is one of"
@echo " html to make standalone HTML files"
@echo " dirhtml to make HTML files named index.html in directories"
@echo " singlehtml to make a single large HTML file"
@echo " pickle to make pickle files"
@echo " json to make JSON files"
@echo " htmlhelp to make HTML files and a HTML help project"
@echo " qthelp to make HTML files and a qthelp project"
@echo " devhelp to make HTML files and a Devhelp project"
@echo " epub to make an epub"
@echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
@echo " latexpdf to make LaTeX files and run them through pdflatex"
@echo " latexpdfja to make LaTeX files and run them through platex/dvipdfmx"
@echo " text to make text files"
@echo " man to make manual pages"
@echo " texinfo to make Texinfo files"
@echo " info to make Texinfo files and run them through makeinfo"
@echo " gettext to make PO message catalogs"
@echo " changes to make an overview of all changed/added/deprecated items"
@echo " xml to make Docutils-native XML files"
@echo " pseudoxml to make pseudoxml-XML files for display purposes"
@echo " linkcheck to check all external links for integrity"
@echo " doctest to run all doctests embedded in the documentation (if enabled)"
clean:
rm -rf $(BUILDDIR)/*
html:
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
@echo
@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
dirhtml:
$(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
@echo
@echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
singlehtml:
$(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml
@echo
@echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."
pickle:
$(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
@echo
@echo "Build finished; now you can process the pickle files."
json:
$(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
@echo
@echo "Build finished; now you can process the JSON files."
htmlhelp:
$(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
@echo
@echo "Build finished; now you can run HTML Help Workshop with the" \
".hhp project file in $(BUILDDIR)/htmlhelp."
qthelp:
$(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
@echo
@echo "Build finished; now you can run "qcollectiongenerator" with the" \
".qhcp project file in $(BUILDDIR)/qthelp, like this:"
@echo "# qcollectiongenerator $(BUILDDIR)/qthelp/h5py.qhcp"
@echo "To view the help file:"
@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/h5py.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/h5py"
@echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/h5py"
@echo "# devhelp"
epub:
$(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub
@echo
@echo "Build finished. The epub file is in $(BUILDDIR)/epub."
latex:
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
@echo
@echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
@echo "Run \`make' in that directory to run these through (pdf)latex" \
"(use \`make latexpdf' here to do that automatically)."
latexpdf:
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
@echo "Running LaTeX files through pdflatex..."
$(MAKE) -C $(BUILDDIR)/latex all-pdf
@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
latexpdfja:
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
@echo "Running LaTeX files through platex and dvipdfmx..."
$(MAKE) -C $(BUILDDIR)/latex all-pdf-ja
@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
text:
$(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text
@echo
@echo "Build finished. The text files are in $(BUILDDIR)/text."
man:
$(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man
@echo
@echo "Build finished. The manual pages are in $(BUILDDIR)/man."
texinfo:
$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
@echo
@echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo."
@echo "Run \`make' in that directory to run these through makeinfo" \
"(use \`make info' here to do that automatically)."
info:
$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
@echo "Running Texinfo files through makeinfo..."
make -C $(BUILDDIR)/texinfo info
@echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo."
gettext:
$(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale
@echo
@echo "Build finished. The message catalogs are in $(BUILDDIR)/locale."
changes:
$(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
@echo
@echo "The overview file is in $(BUILDDIR)/changes."
linkcheck:
$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
@echo
@echo "Link check complete; look for any errors in the above output " \
"or in $(BUILDDIR)/linkcheck/output.txt."
doctest:
$(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
@echo "Testing of doctests in the sources finished, look at the " \
"results in $(BUILDDIR)/doctest/output.txt."
xml:
$(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml
@echo
@echo "Build finished. The XML files are in $(BUILDDIR)/xml."
pseudoxml:
$(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml
@echo
@echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml."
h5py-2.10.0/docs/build.rst 0000664 0001750 0001750 00000017112 13534547675 016457 0 ustar scopatz scopatz 0000000 0000000 .. _install:
Installation
============
.. _install_recommends:
It is highly recommended that you use a pre-built version of h5py, either from a
Python Distribution, an OS-specific package manager, or a pre-built wheel from
PyPI.
Be aware however that most pre-built versions lack MPI support, and that they
are built against a specific version of HDF5. If you require MPI support, or
newer HDF5 features, you will need to build from source.
After installing h5py, you should run the tests to be sure that everything was
installed correctly. This can be done in the python interpreter via::
import h5py
h5py.run_tests()
On Python 2.6 and 2.7, unittest2 must be installed to run the tests.
.. _prebuilt_install:
Pre-built installation (recommended)
-----------------------------------------
Pre-build h5py can be installed via many Python Distributions, OS-specific
package managers, or via h5py wheels.
Python Distributions
....................
If you do not already use a Python Distribution, we recommend either
`Anaconda `_/`Miniconda `_
or
`Enthought Canopy `_, both of which
support most versions of Microsoft Windows, OSX/MacOS, and a variety of Linux
Distributions. Installation of h5py can be done on the command line via::
$ conda install h5py
for Anaconda/MiniConda, and via::
$ enpkg h5py
for Canopy.
Wheels
......
If you have an existing Python installation (e.g. a python.org download,
or one that comes with your OS), then on Windows, MacOS/OSX, and
Linux on Intel computers, pre-built h5py wheels can be installed via pip from
PyPI::
$ pip install h5py
Additionally, for Windows users, `Chris Gohlke provides third-party wheels
which use Intel's MKL `_.
OS-Specific Package Managers
............................
On OSX/MacOS, h5py can be installed via `Homebrew `_,
`Macports `_, or `Fink `_.
The current state of h5py in various Linux Distributions can be seen at
https://pkgs.org/download/python-h5py, and can be installed via the package
manager.
As far as the h5py developers know, none of the Windows package managers (e.g.
`Chocolatey `_, `nuget `_)
have h5py included, however they may assist in installing h5py's requirements
when building from source.
.. _source_install:
Source installation
-------------------
To install h5py from source, you need three things installed:
* A supported Python version with development headers
* HDF5 1.8.4 or newer with development headers
* A C compiler
On Unix platforms, you also need ``pkg-config`` unless you explicitly specify
a path for HDF5 as described in :ref:`custom_install`.
OS-specific instructions for installing HDF5, Python and a C compiler are in the next few
sections.
Additional Python-level requirements should be installed automatically (which
will require an internet connection).
The actual installation of h5py should be done via::
$ pip install --no-binary=h5py h5py
or, from a tarball or git :ref:`checkout ` ::
$ pip install -v .
or ::
$ python setup.py install
If you are working on a development version and the underlying cython files change
it may be necessary to force a full rebuild. The easiest way to achieve this is ::
$ git clean -xfd
from the top of your clone and then rebuilding.
Source installation on OSX/MacOS
................................
HDF5 and Python are most likely in your package manager (e.g. `Homebrew `_,
`Macports `_, or `Fink `_).
Be sure to install the development headers, as sometimes they are not included
in the main package.
XCode comes with a C compiler (clang), and your package manager will likely have
other C compilers for you to install.
Source installation on Linux/Other Unix
.......................................
HDF5 and Python are most likely in your package manager. A C compiler almost
definitely is, usually there is some kind of metapackage to install the
default build tools, e.g. `build-essential`, which should be sufficient for our
needs. Make sure that that you have the development headers, as they are
usually not installed by default. They can usually be found in ``python-dev`` or
similar and ``libhdf5-dev`` or similar.
Source installation on Windows
..............................
Installing from source on Windows is a much more difficult prospect than
installing from source on other OSs, as not only are you likely to need to
compile HDF5 from source, everything must be built with the correct version of
Visual Studio. Additional patches are also needed to HDF5 to get HDF5 and Python
to work together.
We recommend examining the appveyor build scripts, and using those to build and
install HDF5 and h5py.
.. _custom_install:
Custom installation
-------------------
.. important:: Remember that pip installs wheels by default.
To perform a custom installation with pip, you should use::
$ pip install --no-binary=h5py h5py
or build from a git checkout or downloaded tarball to avoid getting
a pre-built version of h5py.
You can specify build options for h5py with the ``configure`` option to
setup.py. Options may be given together or separately::
$ python setup.py configure --hdf5=/path/to/hdf5
$ python setup.py configure --hdf5-version=X.Y.Z
$ python setup.py configure --mpi
Note the ``--hdf5-version`` option is generally not needed, as h5py
auto-detects the installed version of HDF5 (even for custom locations).
Once set, build options apply to all future builds in the source directory.
You can reset to the defaults with the ``--reset`` option::
$ python setup.py configure --reset
You can also configure h5py using environment variables. This is handy
when installing via ``pip``, as you don't have direct access to setup.py::
$ HDF5_DIR=/path/to/hdf5 pip install --no-binary=h5py h5py
$ HDF5_VERSION=X.Y.Z pip install --no-binary=h5py h5py
$ CC="mpicc" HDF5_MPI="ON" HDF5_DIR=/path/to/parallel-hdf5 pip install --no-binary=h5py h5py
Here's a list of all the configure options currently supported:
======================= =========================== ===========================
Option Via setup.py Via environment variable
======================= =========================== ===========================
Custom path to HDF5 ``--hdf5=/path/to/hdf5`` ``HDF5_DIR=/path/to/hdf5``
Force HDF5 version ``--hdf5-version=X.Y.Z`` ``HDF5_VERSION=X.Y.Z``
Enable MPI mode ``--mpi`` ``HDF5_MPI=ON``
======================= =========================== ===========================
.. _build_mpi:
Building against Parallel HDF5
------------------------------
If you just want to build with ``mpicc``, and don't care about using Parallel
HDF5 features in h5py itself::
$ export CC=mpicc
$ pip install --no-binary=h5py h5py
If you want access to the full Parallel HDF5 feature set in h5py
(:ref:`parallel`), you will further have to build in MPI mode. This can either
be done with command-line options from the h5py tarball or by::
$ export HDF5_MPI="ON"
**You will need a shared-library build of Parallel HDF5 (i.e. built with
./configure --enable-shared --enable-parallel).**
To build in MPI mode, use the ``--mpi`` option to ``setup.py configure`` or
export ``HDF5_MPI="ON"`` beforehand::
$ export CC=mpicc
$ export HDF5_MPI="ON"
$ pip install --no-binary=h5py h5py
See also :ref:`parallel`.
h5py-2.10.0/docs/conf.py 0000664 0001750 0001750 00000020430 13534561103 016100 0 ustar scopatz scopatz 0000000 0000000 # -*- coding: utf-8 -*-
#
# h5py documentation build configuration file, created by
# sphinx-quickstart on Fri Jan 31 11:23:59 2014.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# All configuration values have a default; values that are commented out
# serve to show the default.
import sys
import os
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#sys.path.insert(0, os.path.abspath('.'))
# -- General configuration ------------------------------------------------
# If your documentation needs a minimal Sphinx version, state it here.
#needs_sphinx = '1.0'
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
'sphinx.ext.intersphinx',
'sphinx.ext.extlinks',
'sphinx.ext.mathjax',
]
intersphinx_mapping = {'low': ('http://api.h5py.org', None)}
extlinks = {'issue': ('https://github.com/h5py/h5py/issues/%s',
'GH')}
# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
# The suffix of source filenames.
source_suffix = '.rst'
# The encoding of source files.
#source_encoding = 'utf-8-sig'
# The master toctree document.
master_doc = 'index'
# General information about the project.
project = u'h5py'
copyright = u'2014, Andrew Collette and contributors'
# 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 full version, including alpha/beta/rc tags.
release = '2.10.0'
# The short X.Y version.
version = '.'.join(release.split('.')[:2])
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
#language = None
# There are two options for replacing |today|: either, you set today to some
# non-false value, then it is used:
#today = ''
# Else, today_fmt is used as the format for a strftime call.
#today_fmt = '%B %d, %Y'
# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
exclude_patterns = ['_build']
# The reST default role (used for this markup: `text`) to use for all
# documents.
#default_role = None
# If true, '()' will be appended to :func: etc. cross-reference text.
#add_function_parentheses = True
# If true, the current module name will be prepended to all description
# unit titles (such as .. function::).
#add_module_names = True
# If true, sectionauthor and moduleauthor directives will be shown in the
# output. They are ignored by default.
#show_authors = False
# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'sphinx'
# A list of ignored prefixes for module index sorting.
#modindex_common_prefix = []
# If true, keep warnings as "system message" paragraphs in the built documents.
#keep_warnings = False
# -- Options for HTML output ----------------------------------------------
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
html_theme = 'default'
# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
# documentation.
#html_theme_options = {}
# Add any paths that contain custom themes here, relative to this directory.
#html_theme_path = []
# The name for this set of Sphinx documents. If None, it defaults to
# " v documentation".
#html_title = None
# A shorter title for the navigation bar. Default is the same as html_title.
#html_short_title = None
# The name of an image file (relative to this directory) to place at the top
# of the sidebar.
#html_logo = None
# The name of an image file (within the static path) to use as favicon of the
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
# pixels large.
#html_favicon = None
# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
# html_static_path = ['_static']
# Add any extra paths that contain custom files (such as robots.txt or
# .htaccess) here, relative to this directory. These files are copied
# directly to the root of the documentation.
#html_extra_path = []
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
# using the given strftime format.
#html_last_updated_fmt = '%b %d, %Y'
# If true, SmartyPants will be used to convert quotes and dashes to
# typographically correct entities.
#html_use_smartypants = True
# Custom sidebar templates, maps document names to template names.
#html_sidebars = {}
# Additional templates that should be rendered to pages, maps page names to
# template names.
#html_additional_pages = {}
# If false, no module index is generated.
#html_domain_indices = True
# If false, no index is generated.
#html_use_index = True
# If true, the index is split into individual pages for each letter.
#html_split_index = False
# If true, links to the reST sources are added to the pages.
#html_show_sourcelink = True
# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
#html_show_sphinx = True
# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
#html_show_copyright = True
# If true, an OpenSearch description file will be output, and all pages will
# contain a tag referring to it. The value of this option must be the
# base URL from which the finished HTML is served.
#html_use_opensearch = ''
# This is the file name suffix for HTML files (e.g. ".xhtml").
#html_file_suffix = None
# Output file base name for HTML help builder.
htmlhelp_basename = 'h5pydoc'
# -- Options for LaTeX output ---------------------------------------------
latex_elements = {
# The paper size ('letterpaper' or 'a4paper').
#'papersize': 'letterpaper',
# The font size ('10pt', '11pt' or '12pt').
#'pointsize': '10pt',
# Additional stuff for the LaTeX preamble.
#'preamble': '',
}
# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title,
# author, documentclass [howto, manual, or own class]).
latex_documents = [
('index', 'h5py.tex', u'h5py Documentation',
u'Andrew Collette and contributors', 'manual'),
]
# The name of an image file (relative to this directory) to place at the top of
# the title page.
#latex_logo = None
# For "manual" documents, if this is true, then toplevel headings are parts,
# not chapters.
#latex_use_parts = False
# If true, show page references after internal links.
#latex_show_pagerefs = False
# If true, show URL addresses after external links.
#latex_show_urls = False
# Documents to append as an appendix to all manuals.
#latex_appendices = []
# If false, no module index is generated.
#latex_domain_indices = True
# -- Options for manual page output ---------------------------------------
# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
('index', 'h5py', u'h5py Documentation',
[u'Andrew Collette and contributors'], 1)
]
# If true, show URL addresses after external links.
#man_show_urls = False
# -- Options for Texinfo output -------------------------------------------
# Grouping the document tree into Texinfo files. List of tuples
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents = [
('index', 'h5py', u'h5py Documentation',
u'Andrew Collette and contributors', 'h5py', 'One line description of project.',
'Miscellaneous'),
]
# Documents to append as an appendix to all manuals.
#texinfo_appendices = []
# If false, no module index is generated.
#texinfo_domain_indices = True
# How to display URL addresses: 'footnote', 'no', or 'inline'.
#texinfo_show_urls = 'footnote'
# If true, do not generate a @detailmenu in the "Top" node's menu.
#texinfo_no_detailmenu = False
h5py-2.10.0/docs/config.rst 0000664 0001750 0001750 00000005575 13534547675 016637 0 ustar scopatz scopatz 0000000 0000000 Configuring h5py
================
Library configuration
---------------------
A few library options are available to change the behavior of the library.
You can get a reference to the global library configuration object via the
function :func:`h5py.get_config`. This object supports the following
attributes:
**complex_names**
Set to a 2-tuple of strings (real, imag) to control how complex numbers
are saved. The default is ('r','i').
**bool_names**
Booleans are saved as HDF5 enums. Set this to a 2-tuple of strings
(false, true) to control the names used in the enum. The default
is ("FALSE", "TRUE").
**track_order**
Whether to track dataset/group/attribute creation order. If
container creation order is tracked, its links and attributes
are iterated in ascending creation order (consistent with
``dict`` in Python 3.7+); otherwise in ascending alphanumeric
order. Global configuration value can be overriden for
particular container by specifying ``track_order`` argument to
:class:`h5py.File`, :meth:`h5py.Group.create_group`,
:meth:`h5py.Group.create_dataset`. The default is ``False``.
IPython
-------
H5py ships with a custom ipython completer, which provides object introspection
and tab completion for h5py objects in an ipython session. For example, if a
file contains 3 groups, "foo", "bar", and "baz"::
In [4]: f['b
bar baz
In [4]: f['f
# Completes to:
In [4]: f['foo'
In [4]: f['foo'].
f['foo'].attrs f['foo'].items f['foo'].ref
f['foo'].copy f['foo'].iteritems f['foo'].require_dataset
f['foo'].create_dataset f['foo'].iterkeys f['foo'].require_group
f['foo'].create_group f['foo'].itervalues f['foo'].values
f['foo'].file f['foo'].keys f['foo'].visit
f['foo'].get f['foo'].name f['foo'].visititems
f['foo'].id f['foo'].parent
The easiest way to enable the custom completer is to do the following in an
IPython session::
In [1]: import h5py
In [2]: h5py.enable_ipython_completer()
It is also possible to configure IPython to enable the completer every time you
start a new session. For >=ipython-0.11, "h5py.ipy_completer" just needs to be
added to the list of extensions in your ipython config file, for example
:file:`~/.config/ipython/profile_default/ipython_config.py` (if this file does
not exist, you can create it by invoking `ipython profile create`)::
c = get_config()
c.InteractiveShellApp.extensions = ['h5py.ipy_completer']
For