Blob Blame History Raw
%global pname GridDataFormats

%if 0%{?rhel} && 0%{?rhel} <= 6
%{!?__python2: %global __python2 /usr/bin/python2}
%{!?python2_sitelib: %global python2_sitelib %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
%{!?python2_sitearch: %global python2_sitearch %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
%endif

Name: python-%{pname}
Version: 0.2.4
Release: 1%{?dist}
Summary: Read and write data on regular grids in Python
License: LGPLv3+
URL: https://github.com/orbeckst/GridDataFormats
Source0: https://pypi.python.org/packages/source/G/%{pname}/%{pname}-%{version}.tar.gz
BuildArch: noarch
Requires: numpy
Requires: scipy
BuildRequires: numpy
BuildRequires: python2-devel
BuildRequires: python-setuptools

%description
GridDataFormats provides the Python package 'gridData'. It contains a class
('Grid') to handle data on a regular grid --- basically NumPy n-dimensional
arrays. It supports reading from and writing to some common formats (such as
OpenDX).

%prep
%setup -q -n %{pname}-%{version}
# force rebuild of Egg Metadata
rm -r %{pname}.egg-info

%build
%{__python2} setup.py build

%install
%{__python2} setup.py install -O1 --skip-build --root %{buildroot}

%files
%{!?_licensedir:%global license %%doc}
%license COPYING.LESSER
%doc AUTHORS README.rst SUMMARY.txt
%{python2_sitelib}/%{pname}-%{version}-py2.?.egg-info
%{python2_sitelib}/gridData

%changelog
* Tue Feb 03 2015 Dominik Mierzejewski <dominik@greysector.net> 0.2.4-1
- initial build