From d16812958c1e092897ac3646158c1b913c2ec17c06d09d68d839d60e6fa5d606 Mon Sep 17 00:00:00 2001 From: Todd R Date: Thu, 2 Aug 2018 20:27:07 +0000 Subject: [PATCH] Accepting request 627174 from devel:languages:python:misc Utilities to read/write HDF5 files, including MATLAB v7.3 MAT files OBS-URL: https://build.opensuse.org/request/show/627174 OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-hdf5storage?expand=0&rev=1 --- .gitattributes | 23 ++++++++++++ .gitignore | 1 + hdf5storage-0.1.15.zip | 3 ++ python-hdf5storage.changes | 73 ++++++++++++++++++++++++++++++++++++++ python-hdf5storage.spec | 73 ++++++++++++++++++++++++++++++++++++++ 5 files changed, 173 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 hdf5storage-0.1.15.zip create mode 100644 python-hdf5storage.changes create mode 100644 python-hdf5storage.spec diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..9b03811 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,23 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/hdf5storage-0.1.15.zip b/hdf5storage-0.1.15.zip new file mode 100644 index 0000000..75fa8cf --- /dev/null +++ b/hdf5storage-0.1.15.zip @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:79d23ad4ca89b8824b4ff98764ff9403a9830caa7497cae75e001d2dfbbf4e8e +size 129691 diff --git a/python-hdf5storage.changes b/python-hdf5storage.changes new file mode 100644 index 0000000..d9cd19e --- /dev/null +++ b/python-hdf5storage.changes @@ -0,0 +1,73 @@ +------------------------------------------------------------------- +Thu May 24 17:34:42 UTC 2018 - toddrme2178@gmail.com + +- Spec file cleanups + +------------------------------------------------------------------- +Sun Jun 11 06:17:53 UTC 2017 - toddrme2178@gmail.com + + +- Implement single-spec version +- Fix source URL +- Update to version 0.1.14. + + Bugfix release that also added a couple features. + * Issue #45. Fixed syntax errors in unicode strings for Python 3.0 to 3.2. + * Issues #44 and #47. Fixed bugs in testing of conversion and storage of string types. + * Issue #46. Fixed raising of RuntimeWarnings in tests due to signalling NaNs. + * Added requirements files for building documentation and running tests. + * Made it so that Matlab compatability tests are skipped if Matlab is not found, instead of raising errors. +- Update to version 0.1.13. + + Bugfix release fixing the following bug. + * Issue #36. Fixed bugs in writing int and long to HDF5 and their tests on 32 bit systems. +- Update to version 0.1.12. + + Bugfix release fixing the following bugs. In addition, copyright years were also updated and notices put in the Matlab files used for testing. + * Issue #32. Fixed transposing before reshaping np.ndarray when reading from HDF5 files where python metadata was stored but not Matlab metadata. + * Issue #33. Fixed the loss of the number of characters when reading empty numpy string arrays. + * Issue #34. Fixed a conversion error when np.chararray are written with Matlab metadata. +- Update to version 0.1.11. + + Bugfix release fixing the following. + * Issue #30. Fixed loadmat not opening files in read mode. +- Update to version 0.1.10. + + Minor feature/performance fix release doing the following. + * Issue #29. Added writes and reads functions to write and read more than one piece of data at a time and made savemat and loadmat use them to increase performance. Previously, the HDF5 file was being opened and closed for each piece of data, which impacted performance, especially for large files. +- Update to version 0.1.9. + + Bugfix and minor feature release doing the following. + * Issue #23. Fixed bug where a structured np.ndarray with a field name of 'O' could never be written as an HDF5 COMPOUND Dataset (falsely thought a field’s dtype was object). + * Issue #6. Added optional data compression and the storage of data checksums. Controlled by several new options. +- Update to version 0.1.8. + + Bugfix release fixing the following two bugs. + * Issue #21. Fixed bug where the 'MATLAB_class' Attribute is not set when writing dict types when writing MATLAB metadata. + * Issue #22. Fixed bug where null characters ('\x00') and forward slashes ('/') were allowed in dict keys and the field names of structured np.ndarray (except that forward slashes are allowed when the structured_numpy_ndarray_as_struct is not set as is the case when the matlab_compatible option is set). These cause problems for the h5py package and the HDF5 library. NotImplementedError is now thrown in these cases. +- Update to version 0.1.7. + + Bugfix release with an added compatibility option and some added test code. Did the following. + * Fixed an issue reading variables larger than 2 GB in MATLAB MAT v7.3 files when no explicit variable names to read are given to hdf5storage.loadmat. Fix also reduces memory consumption and processing time a little bit by removing an unneeded memory copy. + * Options now will accept any additional keyword arguments it doesn’t support, ignoring them, to be API compatible with future package versions with added options. + * Added tests for reading data that has been compressed or had other HDF5 filters applied. +- Update to version 0.1.6. + + Bugfix release fixing a bug with determining the maximum size of a Python 2.x int on a 32-bit system. +- Update to version 0.1.5. + + Bugfix release fixing the following bug. + * Fixed bug where an int could be stored that is too big to fit into an int when read back in Python 2.x. When it is too big, it is converted to a long. + * Fixed a bug where an int or long that is too big to big to fit into an np.int64 raised the wrong exception. + * Fixed bug where fields names for structured np.ndarray with non-ASCII characters (assumed to be UTF-8 encoded in Python 2.x) can’t be read or written properly. + * Fixed bug where np.bytes_ with non-ASCII characters can were converted incorrectly to UTF-16 when that option is set (set implicitly when doing MATLAB compatibility). Now, it throws a NotImplementedError. +- Update to version 0.1.4. + + Bugfix release fixing the following bugs. Thanks goes to mrdomino for writing the bug fixes. + * Fixed bug where dtype is used as a keyword parameter of np.ndarray.astype when it is a positional argument. + * Fixed error caused by h5py.__version__ being absent on Ubuntu 12.04. +- Update to version 0.1.3. + + Bugfix release fixing the following bug. + * Fixed broken ability to correctly read and write empty structured np.ndarray (has fields). +- Update to version 0.1.2. + + Bugfix release fixing the following bugs. + * Removed mistaken support for np.float16 for h5py versions before 2.2 since that was when support for it was introduced. + * Structured np.ndarray where one or more fields is of the 'object' dtype can now be written without an error when the structured_numpy_ndarray_as_struct option is not set. They are written as an HDF5 Group, as if the option was set. + * Support for the 'MATLAB_fields' Attribute for data types that are structures in MATLAB has been added for when the version of the h5py package being used is 2.3 or greater. Support is still missing for earlier versions (this package requires a minimum version of 2.1). + * The check for non-unicode string keys (str in Python 3 and unicode in Python 2) in the type dict is done right before any changes are made to the HDF5 file instead of in the middle so that no changes are applied if an invalid key is present. + * HDF5 userblock set with the proper metadata for MATLAB support right at the beginning of when data is being written to an HDF5 file instead of at the end, meaning the writing can crash and the file will still be a valid MATLAB file. + +------------------------------------------------------------------- +Fri May 30 13:26:15 UTC 2014 - toddrme2178@gmail.com + +- initial version + diff --git a/python-hdf5storage.spec b/python-hdf5storage.spec new file mode 100644 index 0000000..84fef22 --- /dev/null +++ b/python-hdf5storage.spec @@ -0,0 +1,73 @@ +# +# spec file for package python-hdf5storage +# +# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# + + +%{?!python_module:%define python_module() python-%{**} python3-%{**}} +Name: python-hdf5storage +Version: 0.1.15 +Release: 0 +Summary: Utilities to read/write HDF5 files, including MATLAB v7.3 MAT files +License: BSD-3-Clause +Group: Development/Languages/Python +Url: https://github.com/frejanordsiek/hdf5storage +Source: https://files.pythonhosted.org/packages/source/h/hdf5storage/hdf5storage-%{version}.zip +BuildRequires: fdupes +BuildRequires: python-rpm-macros +BuildRequires: %{python_module devel} +BuildRequires: %{python_module setuptools} +BuildRequires: %{python_module h5py >= 2.1} +BuildRequires: %{python_module numpy} +BuildRequires: %{python_module scipy} +BuildRequires: unzip +# SECTION test requirements +BuildRequires: %{python_module nose} +# /SECTION +Requires: python-h5py >= 2.1 +Requires: python-numpy +Requires: python-scipy +BuildArch: noarch +%python_subpackages + +%description +This Python package provides high level utilities to read/write a +variety of Python types to/from HDF5 (Heirarchal Data Format) formatted +files. This package also provides support for MATLAB MAT v7.3 formatted +files, which are just HDF5 files with a different extension and some +extra meta-data. + +%prep +%setup -q -n hdf5storage-%{version} +# fix end-of-line encoding +sed -i 's/\r$//' COPYING.txt + +%build +%python_build + +%install +%python_install +%python_expand %fdupes %{buildroot}%{$python_sitelib} + +%check +%python_exec setup.py test + +%files %{python_files} +%doc README.rst +%license COPYING.txt +%{python_sitelib}/hdf5storage/ +%{python_sitelib}/hdf5storage-%{version}-py*.egg-info + +%changelog