File python-h5netcdf.spec of Package python-h5netcdf

#
# spec file for package python-h5netcdf
#
# Copyright (c) 2017 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/
#

# Test scripts not included in package
%bcond_with test

%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name:           python-h5netcdf
Version:        0.3.1
Release:        0
Summary:        Python interface for netCDF4 via h5py
License:        BSD-3-Clause
Group:          Development/Languages/Python
Url:            https://github.com/shoyer/h5netcdf
Source:         https://files.pythonhosted.org/packages/source/h/h5netcdf/h5netcdf-%{version}.tar.gz
BuildRequires:  fdupes
BuildRequires:  python-rpm-macros
BuildRequires:  %{python_module devel}
BuildRequires:  %{python_module setuptools}
BuildRequires:  %{python_module h5py}
%if %{with test}
BuildRequires:  %{python_module Cython >= 0.19}
BuildRequires:  %{python_module netCDF4}
BuildRequires:  %{python_module pytest}
BuildRequires:  python-pytest
BuildRequires:  python-netCDF4
%endif
Requires:       python-h5py
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildArch:      noarch
%python_subpackages

%description
A Python interface for the netCDF4 file-format that reads and writes HDF5
files API directly via h5py, without relying on the Unidata netCDF library.

This is an experimental project. It currently passes basic tests for
reading and writing netCDF4 files with Python, but it has not been tested for
compatibility with other netCDF4 interfaces.

%prep
%setup -q -n h5netcdf-%{version}

%build
%python_build

%install
%python_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}

%if %{with test}
%check
%python_exec setup.py test
%endif

%files %{python_files}
%defattr(-,root,root,-)
%doc LICENSE README.rst
%{python_sitelib}/*

%changelog
openSUSE Build Service is sponsored by