Use new python macros and add python2 subpackage

This commit is contained in:
Thomas Spura
2015-11-15 11:55:34 +01:00
parent 5ac451a602
commit c10bb6f7b7

View File

@@ -3,7 +3,7 @@
Name: python-%{upname}
Version: 0.6.0
Release: 6%{?dist}
Release: 7%{?dist}
Summary: Collection of fast NumPy array functions written in Cython
License: BSD
@@ -23,11 +23,20 @@ BuildRequires: python3-scipy
BuildRequires: python3-setuptools
BuildRequires: scipy
%description
%{name} is a collection of fast NumPy array functions
written in Cython.
%package -n python2-%{upname}
Summary: Collection of fast NumPy array functions written in Cython
%{?python_provide:%python_provide python2-%{upname}}
Requires: numpy%{?_isa}
Requires: scipy%{?_isa}
%description
%{name} is a collection of fast NumPy array functions
%description -n python2-%{upname}
python2-%{upname} is a collection of fast NumPy array functions
written in Cython.
@@ -35,6 +44,7 @@ written in Cython.
Summary: Documentation files for %{name}
BuildArch: noarch
Provides: python2-%{upname}-doc = %{version}-%{release}
Provides: python3-%{upname}-doc = %{version}-%{release}
%description doc
@@ -43,6 +53,7 @@ This package contains the HTML-docs for %{name}.
%package -n python3-%{upname}
Summary: Collection of fast NumPy array functions written in Cython
%{?python_provide:%python_provide python2-%{upname}}
Requires: python3-numpy%{?_isa}
Requires: python3-scipy%{?_isa}
@@ -54,8 +65,6 @@ written in Cython.
%prep
%setup -qn %{upname}-%{version}
rm -rf %{py3dir}
cp -a . %{py3dir}
%build
@@ -63,10 +72,8 @@ cp -a . %{py3dir}
%configure ||:
# build
%{__python} setup.py build
pushd %{py3dir}
%{__python3} setup.py build
popd
%py2_build
%py3_build
# build autodocs
export PYTHONPATH="`pwd`/`find . -depth -type d -name lib.linux*`"
@@ -89,7 +96,6 @@ rm -rf test_install/%{python_sitearch}/bottleneck/src \
# install into buildroot
cp -a test_install/* %{buildroot}
pushd %{py3dir}
%{__python3} setup.py install -O1 --skip-build --root `pwd`/test_install
# clean unneeded stuff
@@ -98,21 +104,20 @@ rm -rf test_install/%{python3_sitearch}/bottleneck/src \
# install into buildroot
cp -a test_install/* %{buildroot}
popd
%{_fixperms} %{buildroot}/*
%check
pushd `find . -depth -type d -name lib.linux*`
%{__python} -c 'import bottleneck as bn; bn.test()'
pushd build/lib.linux-*-2.?
%{__python2} -c 'import bottleneck as bn; bn.test()'
popd
pushd `find %{py3dir} -depth -type d -name lib.linux*`
pushd build/lib.linux-*-3.?
%{__python3} -c 'import bottleneck as bn; bn.test()'
popd
%files
%files -n python2-%{upname}
%doc bottleneck/LICENSE
%{python_sitearch}/*
@@ -125,6 +130,9 @@ popd
%changelog
* Sun Nov 15 2015 Thomas Spura <tomspur@fedoraproject.org> - 0.6.0-7
- Use new python macros and add python2 subpackage
* Tue Nov 10 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.6.0-6
- Rebuilt for https://fedoraproject.org/wiki/Changes/python3.5