Coverage for /pythoncovmergedfiles/medio/medio/usr/local/lib/python3.8/site-packages/h5py/version.py: 85%
20 statements
« prev ^ index » next coverage.py v7.3.2, created at 2023-10-05 06:32 +0000
« prev ^ index » next coverage.py v7.3.2, created at 2023-10-05 06:32 +0000
1# This file is part of h5py, a Python interface to the HDF5 library.
2#
3# http://www.h5py.org
4#
5# Copyright 2008-2013 Andrew Collette and contributors
6#
7# License: Standard 3-clause BSD; see "license.txt" for full license terms
8# and contributor agreement.
10"""
11 Versioning module for h5py.
12"""
14from collections import namedtuple
15from . import h5 as _h5
16import sys
17import numpy
19# All should be integers, except pre, as validating versions is more than is
20# needed for our use case
21_H5PY_VERSION_CLS = namedtuple("_H5PY_VERSION_CLS",
22 "major minor bugfix pre post dev")
24hdf5_built_version_tuple = _h5.HDF5_VERSION_COMPILED_AGAINST
26version_tuple = _H5PY_VERSION_CLS(3, 9, 0, None, None, None)
28version = "{0.major:d}.{0.minor:d}.{0.bugfix:d}".format(version_tuple)
29if version_tuple.pre is not None:
30 version += version_tuple.pre
31if version_tuple.post is not None:
32 version += ".post{0.post:d}".format(version_tuple)
33if version_tuple.dev is not None:
34 version += ".dev{0.dev:d}".format(version_tuple)
36hdf5_version_tuple = _h5.get_libversion()
37hdf5_version = "%d.%d.%d" % hdf5_version_tuple
39api_version_tuple = (1,8)
40api_version = "%d.%d" % api_version_tuple
42info = """\
43Summary of the h5py configuration
44---------------------------------
46h5py %(h5py)s
47HDF5 %(hdf5)s
48Python %(python)s
49sys.platform %(platform)s
50sys.maxsize %(maxsize)s
51numpy %(numpy)s
52cython (built with) %(cython_version)s
53numpy (built against) %(numpy_build_version)s
54HDF5 (built against) %(hdf5_build_version)s
55""" % {
56 'h5py': version,
57 'hdf5': hdf5_version,
58 'python': sys.version,
59 'platform': sys.platform,
60 'maxsize': sys.maxsize,
61 'numpy': numpy.__version__,
62 'cython_version': _h5.CYTHON_VERSION_COMPILED_WITH,
63 'numpy_build_version': _h5.NUMPY_VERSION_COMPILED_AGAINST,
64 'hdf5_build_version': "%d.%d.%d" % hdf5_built_version_tuple,
65}