Репозиторий Sisyphus
Последнее обновление: 17 июля 2019 | Пакетов: 17686 | Посещений: 14334989
en ru br
Репозитории ALT
S:2.9.0-alt2
5.1: 1.2.1-alt1
www.altlinux.org/Changes

Группа :: Разработка/Python
Пакет: h5py

 Главная   Изменения   Спек   Патчи   Sources   Загрузить   Gear   Bugs and FR  Repocop 

%define hdf5dir %_libdir/hdf5-seq

%def_with python3

%define descr \
HDF5 for Python (h5py) is a general-purpose Python interface to the \
Hierarchical Data Format library, version 5. HDF5 is a versatile, mature \
scientific software library designed for the fast, flexible storage of \
enormous amounts of data. \
\
From a Python programmer's perspective, HDF5 provides a robust way to \
store data, organized by name in a tree-like fashion. You can create \
datasets (arrays on disk) hundreds of gigabytes in size, and perform \
random-access I/O on desired sections. Datasets are organized in a \
filesystem-like hierarchy using containers called "groups", and accessed \
using the tradional POSIX /path/to/resource syntax. \
\
H5py provides a simple, robust read/write interface to HDF5 data from \
Python. Existing Python and Numpy concepts are used for the interface; \
for example, datasets on disk are represented by a proxy class that \
supports slicing, and has dtype and shape attributes. HDF5 groups are \
presented using a dictionary metaphor, indexed by name.

Name: h5py
Version: 2.9.0
Release: alt2
Summary: Python interface to the Hierarchical Data Format library, version 5
License: MIT
Group: Development/Python
Url: http://www.h5py.org/

# https://github.com/h5py/h5py.git

Source: %name-%version.tar
Patch1: %name-%version-alt.patch

BuildRequires: python-devel libnumpy-devel libhdf5-devel
BuildRequires: libsz2-devel python-module-Cython python-module-Pyrex
BuildRequires: python-module-sphinx-devel python-module-Pygments
BuildRequires: python-module-setuptools python-module-six
BuildRequires: python-module-pkgconfig python-module-unittest2
BuildRequires: python-module-numpy-testing
%if_with python3
BuildRequires(pre): rpm-build-python3
BuildRequires: python3-devel libnumpy-py3-devel
BuildRequires: python3-module-setuptools
BuildRequires: python3-module-Cython python3-module-six
BuildRequires: python3-module-pkgconfig
BuildRequires: python3-module-numpy-testing
%endif

%description
%descr

%package -n python-module-%name
Summary: Python interface to the Hierarchical Data Format library, version 5
Group: Development/Python
%setup_python_module %name
%py_requires multiprocessing
%py_requires h5py.tests

%description -n python-module-%name
%descr

%if_with python3
%package -n python3-module-%name
Summary: Python interface to the Hierarchical Data Format library, version 5
Group: Development/Python3
%py3_requires h5py.tests

%description -n python3-module-%name
%descr
%endif

%package -n python-module-%name-doc
Summary: Documentation for Python interface to the HDF5
Group: Development/Documentation
BuildArch: noarch

%description -n python-module-%name-doc
%descr

This package contains development documentation for H5PY.

%package -n python-module-%name-pickles
Summary: Pickles for Python interface to the HDF5
Group: Development/Python

%description -n python-module-%name-pickles
%descr

This package contains pickles for H5PY.

%package -n python-module-%name-tests
Summary: Tests for Python interface to the HDF5
Group: Development/Python
Requires: python-module-%name = %version-%release

%description -n python-module-%name-tests
%descr

This package contains tests for H5PY.

%if_with python3
%package -n python3-module-%name-tests
Summary: Tests for Python interface to the HDF5
Group: Development/Python3
Requires: python3-module-%name = %version-%release

%description -n python3-module-%name-tests
%descr

This package contains tests for H5PY.
%endif

%prep
%setup
%patch1 -p1

%if_with python3
cp -fR . ../python3
%endif

sed -i 's| at PYVER at |%_python_version|g' docs/Makefile

%prepare_sphinx .
ln -s ../objects.inv docs/
ln -s ../objects.inv docs_api/

%build
%add_optflags -fno-strict-aliasing
python setup.py configure --hdf5=%hdf5dir
python api_gen.py
%python_build_debug

%if_with python3
pushd ../python3
python3 setup.py configure --hdf5=%hdf5dir
python3 api_gen.py
%python3_build_debug
popd
%endif

%install
%python_install

%if_with python3
pushd ../python3
%python3_install
popd
%endif

export PYTHONPATH=%buildroot%python_sitelibdir
pushd docs
%make html
%make pickle
popd
%make -C docs_api html

install -d %buildroot%python_sitelibdir/%name/examples
install -p -m644 examples/* %buildroot%python_sitelibdir/%name/examples
touch %buildroot%python_sitelibdir/%name/examples/__init__.py

install -d %buildroot%_docdir/%name
cp -fR docs/_build/html %buildroot%_docdir/%name/html
cp -fR docs_api/_build/html %buildroot%_docdir/%name/api
cp -fR lzf %buildroot%_docdir/%name/
#install -m644 docs/build/latex/*.pdf %buildroot%_docdir/%name/pdf

# pickles


cp -fR docs/_build/pickle %buildroot%python_sitelibdir/%name/

%check
python setup.py test
%if_with python3
pushd ../python3
python3 setup.py test
popd
%endif

%files -n python-module-%name
%doc licenses *.rst
%python_sitelibdir/*
%exclude %python_sitelibdir/%name/pickle
%exclude %python_sitelibdir/%name/examples
%exclude %python_sitelibdir/*/tests

%files -n python-module-%name-doc
%_docdir/%name

%files -n python-module-%name-tests
%python_sitelibdir/*/tests
%python_sitelibdir/%name/examples

%files -n python-module-%name-pickles
%dir %python_sitelibdir/%name
%python_sitelibdir/%name/pickle

%if_with python3
%files -n python3-module-%name
%doc licenses *.rst
%python3_sitelibdir/*
%exclude %python3_sitelibdir/*/tests

%files -n python3-module-%name-tests
%python3_sitelibdir/*/tests
%endif

%changelog

Полный changelog можно просмотреть здесь

 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin