%global pkgname nmrglue %global pkgsum Python module for processing NMR data Name: python-%{pkgname} Version: 0.5 Release: 3%{?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 Mar 07 2016 Mukundan Ragavan - 0.5-3 - Enable tests - Fix source URL - Remove tests from the package * Sun Mar 06 2016 Mukundan Ragavan - 0.5-2 - Fix requires - move to subpackages - Shorten description * Sat Mar 5 2016 Mukundan Ragavan - 0.5-1 - Initial package