Updated to new upstream release (rhbz#1105817)

Updated spec-file to recent guidelines
This commit is contained in:
Björn Esser
2017-04-09 16:04:44 +02:00
parent ca8b848bd7
commit 2b9fa2d841
2 changed files with 73 additions and 72 deletions
+72 -71
View File
@@ -1,135 +1,136 @@
%global __provides_exclude_from ^%{python_sitearch}/.*\\.so
%global upname Bottleneck
Name: python-%{upname}
Version: 0.6.0
Release: 11%{?dist}
Version: 1.2.0
Release: 1%{?dist}
Summary: Collection of fast NumPy array functions written in Cython
License: BSD
URL: http://berkeleyanalytics.com/bottleneck
Source0: https://pypi.python.org/packages/source/B/%{upname}/%{upname}-%{version}.tar.gz
BuildRequires: numpy
BuildRequires: python-nose
%{?!fc18:BuildRequires: python-numpydoc}
BuildRequires: python-setuptools
BuildRequires: python-sphinx
BuildRequires: python2-devel
BuildRequires: python3-devel
BuildRequires: python3-nose
BuildRequires: python3-numpy
BuildRequires: python3-scipy
BuildRequires: python3-setuptools
BuildRequires: scipy
Source0: https://files.pythonhosted.org/packages/source/B/%{upname}/%{upname}-%{version}.tar.gz
%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 -n python2-%{upname}
python2-%{upname} is a collection of fast NumPy array functions
written in Cython.
%package doc
Summary: Documentation files for %{name}
BuildArch: noarch
Provides: python2-%{upname}-doc = %{version}-%{release}
Provides: python3-%{upname}-doc = %{version}-%{release}
%description doc
This package contains the HTML-docs for %{name}.
%package -n python2-%{upname}
Summary: Collection of fast NumPy array functions written in Cython
BuildRequires: numpy
BuildRequires: python-nose
BuildRequires: python-setuptools
BuildRequires: python-sphinx
BuildRequires: python2-devel
BuildRequires: scipy
Requires: numpy%{?_isa}
Requires: scipy%{?_isa}
%{?python_provide:%python_provide python2-%{upname}}
%description -n python2-%{upname}
python2-%{upname} is a collection of fast NumPy array functions
written in Cython.
%package -n python3-%{upname}
Summary: Collection of fast NumPy array functions written in Cython
%{?python_provide:%python_provide python2-%{upname}}
BuildRequires: python3-devel
BuildRequires: python3-nose
BuildRequires: python3-numpy
BuildRequires: python3-scipy
BuildRequires: python3-setuptools
Requires: python3-numpy%{?_isa}
Requires: python3-scipy%{?_isa}
%{?python_provide:%python_provide python2-%{upname}}
%description -n python3-%{upname}
python3-%{upname} is a collection of fast NumPy array functions
written in Cython.
%prep
%setup -qn %{upname}-%{version}
%autosetup -n %{upname}-%{version} -p 1
%{__rm} -fr *.egg*
%build
# export compiler-flags
%configure ||:
# build
%py2_build
%py3_build
# build autodocs
export PYTHONPATH="`pwd`/`find . -depth -type d -name lib.linux*`"
pushd doc
mkdir -p source/_static
make html
# clean unneeded stuff from docs
rm -rf build/html/.buildinfo \
build/html/_sources
%install
%{__python} setup.py install -O1 --skip-build --root `pwd`/test_install
%py2_install
%py3_install
# clean unneeded stuff
rm -rf test_install/%{python_sitearch}/bottleneck/src \
test_install/%{python_sitearch}/bottleneck/LICENSE
# install into buildroot
cp -a test_install/* %{buildroot}
%{__python3} setup.py install -O1 --skip-build --root `pwd`/test_install
# clean unneeded stuff
rm -rf test_install/%{python3_sitearch}/bottleneck/src \
test_install/%{python3_sitearch}/bottleneck/LICENSE
# install into buildroot
cp -a test_install/* %{buildroot}
%{__rm} -rf %{buildroot}%{python2_sitearch}/bottleneck/src \
%{buildroot}%{python2_sitearch}/bottleneck/LICENSE \
%{buildroot}%{python3_sitearch}/bottleneck/src \
%{buildroot}%{python3_sitearch}/bottleneck/LICENSE
%{_fixperms} %{buildroot}/*
# Move installed files to temporary location.
%{__mkdir} -p tmp_inst
%{__cp} -fpr %{buildroot}/* tmp_inst
# Build the autodocs.
export PYTHONPATH="$(/bin/pwd)/tmp_inst/%{python2_sitearch}"
%{__mkdir} -p doc/source/_static
%{_bindir}/sphinx-build -b html doc/source doc/html
unset PYTHONPATH
# Clean unneeded stuff from docs.
%{__rm} -rf doc/html/{.buildinfo,.doctrees,objects.inv}
%check
pushd build/lib.linux-*-2.?
pushd tmp_inst/%{python2_sitearch}
%{__python2} -c 'import bottleneck as bn; bn.test()'
popd
pushd build/lib.linux-*-3.?
pushd tmp_inst/%{python3_sitearch}
%{__python3} -c 'import bottleneck as bn; bn.test()'
popd
%files -n python2-%{upname}
%doc bottleneck/LICENSE
%{python_sitearch}/*
%files doc
%doc README* RELEASE* bottleneck/LICENSE doc/build/html
%license bottleneck/LICENSE
%doc README* RELEASE* doc/html
%files -n python2-%{upname}
%license bottleneck/LICENSE
%doc README* RELEASE*
%{python2_sitearch}/bottleneck
%{python2_sitearch}/%{upname}-%{version}-py%{python2_version}.egg-info
%files -n python3-%{upname}
%doc bottleneck/LICENSE
%{python3_sitearch}/*
%license bottleneck/LICENSE
%doc README* RELEASE*
%{python3_sitearch}/bottleneck
%{python3_sitearch}/%{upname}-%{version}-py%{python3_version}.egg-info
%changelog
* Sun Apr 09 2017 Björn Esser <besser82@fedoraproject.org> - 1.2.0-1
- Updated to new upstream release (rhbz#1105817)
- Updated spec-file to recent guidelines
* Sat Feb 11 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.0-11
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
+1 -1
View File
@@ -1 +1 @@
44ede1261fae49445b695ac861e48cb9 Bottleneck-0.6.0.tar.gz
SHA512 (Bottleneck-1.2.0.tar.gz) = 2dce3626b33923b4ab08047910b38e5531090a58f63a380392b78352c3dc657b947dc6dcad306734beaf130855c10ff9fb0048c027821720660fc62a242daafb