Blob Blame History Raw
%global pkgname nmrglue
%global pkgsum Python module for processing NMR data

Name:		python-%{pkgname}
Version:	0.6
Release:	1%{?dist}
Summary:	%{pkgsum}

License:	BSD
URL:		https://github.com/jjhelmus/%{pkgname}
Source0:	https://github.com/jjhelmus/%{pkgname}/archive/v%{version}.tar.gz

BuildArch:	noarch
BuildRequires:	python2-devel
BuildRequires:	python3-devel
# these are required for tests
BuildRequires:	python3-numpy
BuildRequires:	python3-scipy
BuildRequires:	python2-numpy
BuildRequires:	python2-scipy

%description
nmrglue is a module for working with NMR data in Python. When used with the 
numpy, scipy, and matplotlib packages nmrglue provides a robust interpreted 
environment for processing, analyzing, and inspecting NMR data.

%package -n python2-%{pkgname}
Summary:	%{pkgsum}
%{?python_provide:%python_provide python2-%{pkgname}}
Requires:	python2-numpy
Requires:	python2-scipy

%description -n python2-%{pkgname}
nmrglue is a module for working with NMR data in Python. When used with the 
numpy, scipy, and matplotlib packages nmrglue provides a robust interpreted 
environment for processing, analyzing, and inspecting NMR data.


%package -n python3-%{pkgname}
Summary:	%{pkgsum}
%{?python_provide:%python_provide python3-%{pkgname}}
Requires:	python3-numpy
Requires:	python3-scipy

%description -n python3-%{pkgname}
nmrglue is a module for working with NMR data in Python. When used with the 
numpy, scipy, and matplotlib packages nmrglue provides a robust interpreted 
environment for processing, analyzing, and inspecting NMR data.

%prep
%autosetup -n %{pkgname}-%{version}

# disable tests bundling
sed -i '/nmrglue.fileio.tests/d' setup.py
sed -i '/package_data/d' setup.py
sed -i '/fileio\/tests\/data\//d' setup.py


%build
%py2_build
%py3_build

%install
%py2_install
%py3_install

%check

pushd nmrglue/fileio/tests

# python2 tests
PYTHONPATH="%{buildroot}%{python2_sitelib}" %{__python2} test_pipe.py

#python3 tests
PYTHONPATH="%{buildroot}%{python3_sitelib}" %{__python3} test_pipe.py

popd



%files -n python2-%{pkgname}
%license LICENSE.txt
%doc README.rst TODO.txt
%{python2_sitelib}/*

%files -n python3-%{pkgname}
%license LICENSE.txt
%doc README.rst TODO.txt
%{python3_sitelib}/*

%changelog
* Mon Apr 24 2017 Mukundan Ragavan <nonamedotc@fedoraproject.org> - 0.6-1
- Update to version 0.6

* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.5-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild

* Mon Dec 19 2016 Miro HronĨok <mhroncok@redhat.com> - 0.5-5
- Rebuild for Python 3.6

* Tue Jul 19 2016 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.5-4
- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages

* Mon Mar 07 2016 Mukundan Ragavan <nonamedotc@gmail.com> - 0.5-3
- Enable tests
- Fix source URL
- Remove tests from the package

* Sun Mar 06 2016 Mukundan Ragavan <nonamedotc@gmail.com> - 0.5-2
- Fix requires - move to subpackages
- Shorten description

* Sat Mar  5 2016 Mukundan Ragavan <nonamedotc@gmail.com> - 0.5-1
- Initial package