[h5py] Initial commit (#665853)
terjeros
terjeros at fedoraproject.org
Sun Jul 10 16:30:50 UTC 2011
commit c3192d29266724d205cae323b2b9bf96cd8c9ede
Author: Terje Røsten <terje.rosten at ntnu.no>
Date: Sun Jul 10 18:30:08 2011 +0200
Initial commit (#665853)
.gitignore | 1 +
h5py-1.3.1-system-lzf.patch | 34 ++++++++++++++++
h5py.spec | 88 +++++++++++++++++++++++++++++++++++++++++++
sources | 1 +
4 files changed, 124 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..b199464 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/h5py-1.3.1.tar.gz
diff --git a/h5py-1.3.1-system-lzf.patch b/h5py-1.3.1-system-lzf.patch
new file mode 100644
index 0000000..7bae078
--- /dev/null
+++ b/h5py-1.3.1-system-lzf.patch
@@ -0,0 +1,34 @@
+--- h5py-1.3.1.ORIG/lzf/lzf_filter.c 2011-05-22 22:20:02.488196039 +0200
++++ h5py-1.3.1.ORIG/lzf/lzf_filter.c 2011-05-22 23:09:49.235190001 +0200
+@@ -26,7 +26,7 @@
+ #include <stdio.h>
+ #include <errno.h>
+ #include "hdf5.h"
+-#include "lzf/lzf.h"
++#include "lzf.h"
+ #include "lzf_filter.h"
+
+ /* Our own versions of H5Epush_sim, as it changed in 1.8 */
+--- h5py-1.3.1.ORIG/setup.py 2011-05-22 22:20:02.487196131 +0200
++++ h5py-1.3.1.ORIG/setup.py 2011-05-22 23:10:46.158190215 +0200
+@@ -167,7 +167,7 @@
+ COMPILER_SETTINGS['library_dirs'] += [op.join(HDF5, 'dll')]
+ else:
+ COMPILER_SETTINGS = {
+- 'libraries' : ['hdf5'],
++ 'libraries' : ['hdf5','lzf'],
+ 'include_dirs' : [numpy.get_include(), localpath('lzf')],
+ 'library_dirs' : [],
+ 'define_macros' : [('H5_USE_16_API', None)]
+@@ -183,9 +183,7 @@
+ MODULES = ['h5', 'h5e', 'h5f', 'h5g', 'h5s', 'h5t', 'h5d', 'h5a', 'h5p', 'h5z',
+ 'h5i', 'h5r', 'h5fd', 'utils', 'h5o', 'h5l', '_conv', '_proxy']
+
+-EXTRA_SRC = {'h5': [ localpath("lzf/lzf_filter.c"),
+- localpath("lzf/lzf/lzf_c.c"),
+- localpath("lzf/lzf/lzf_d.c")]}
++EXTRA_SRC = {'h5': [ localpath("lzf/lzf_filter.c") ]}
+
+ def make_extension(module):
+ sources = [op.join('h5py', module+'.c')] + EXTRA_SRC.get(module, [])
+
diff --git a/h5py.spec b/h5py.spec
new file mode 100644
index 0000000..83798d2
--- /dev/null
+++ b/h5py.spec
@@ -0,0 +1,88 @@
+%{?filter_provides_in: %filter_provides_in .*/h5py/.*\.so}
+%{?filter_setup}
+
+Summary: A Python interface to the HDF5 library
+Name: h5py
+Version: 1.3.1
+Release: 4%{?dist}
+Group: Applications/Engineering
+License: BSD
+URL: http://h5py.alfven.org/
+Source0: http://h5py.googlecode.com/files/h5py-%{version}.tar.gz
+# patch to use a system liblzf rather than bundled liblzf
+Patch0: h5py-1.3.1-system-lzf.patch
+BuildRequires: python-devel
+BuildRequires: python-nose
+BuildRequires: python-sphinx
+BuildRequires: hdf5-devel >= 1.8.2
+BuildRequires: numpy >= 1.0.3
+BuildRequires: liblzf-devel
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+Requires: numpy >= 1.0.3
+
+%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, data sets and groups using established
+Python and NumPy concepts.
+
+A strong emphasis on automatic conversion between Python (Numpy)
+data types and data structures and their HDF5 equivalents vastly
+simplifies the process of reading and writing data from Python.
+
+%prep
+%setup -q
+# use system libzlf and remove private copy
+%patch0 -p1
+rm -rf lzf/lzf
+
+%build
+export CC="%{__cc}"
+export CFLAGS="%{optflags} -fopenmp -llzf"
+%{__python} setup.py configure --hdf5=%{_libdir} --api=18
+%{__python} setup.py build
+# build docs
+dir=$(basename build/lib.linux-*)
+PYTHONPATH=$(pwd)/build/$dir make -C docs html
+rm -f docs/build/html/.buildinfo
+
+%install
+rm -rf %{buildroot}
+%{__python} setup.py install -O1 --skip-build --root %{buildroot}
+chmod 0755 %{buildroot}%{python_sitearch}/%{name}/*.so
+
+%check
+%{__python} setup.py nosetests
+
+%clean
+rm -rf %{buildroot}
+
+%files
+%defattr(-, root, root, -)
+%doc README.txt LICENSE.txt h5py.egg-info licenses
+%doc docs/build/html
+%{python_sitearch}/%{name}/
+%{python_sitearch}/%{name}-%{version}-*.egg-info/
+
+%changelog
+* Mon May 23 2011 Terje Rosten <terje.rosten at ntnu.no> - 1.3.1-4
+- add patch from Steve Traylen (thanks!) to use system liblzf
+
+* Thu Jan 13 2011 Terje Rosten <terje.rosten at ntnu.no> - 1.3.1-3
+- fix buildroot
+- add filter
+- don't remove egg-info files
+- remove explicit hdf5 req
+
+* Sun Jan 2 2011 Terje Rosten <terje.rosten at ntnu.no> - 1.3.1-2
+- build and ship docs as html
+
+* Mon Dec 27 2010 Terje Rosten <terje.rosten at ntnu.no> - 1.3.1-1
+- 1.3.1
+- license is BSD only
+- run tests
+- new url
+
+* Sat Jul 3 2009 Joseph Smidt <josephsmidt at gmail.com> - 1.2.0-1
+- initial RPM release
diff --git a/sources b/sources
index e69de29..c8d1555 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+cfef84992d33910a06371dc35becb71b h5py-1.3.1.tar.gz
More information about the scm-commits
mailing list