File python-numpy-doc.spec of Package python-numpy

#
# spec file for package python-numpy-doc
#
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#


Name:           python-numpy-doc
Version:        1.12.1
Release:        0
Summary:        Documentation for python-numpy
License:        BSD-3-Clause
Group:          Development/Libraries/Python
Url:            http://www.numpy.org/
Source:         https://pypi.io/packages/source/n/numpy/numpy-%{version}.zip
# PATCH-FIX-OPENSUSE numpy-buildfix.patch -- openSUSE-specific build fixes
Patch0:         numpy-buildfix.patch
# PATCH-FIX-OPENSUSE numpy-1.9.0-remove-__declspec.patch -- fix for spurious compiler warnings that cause build failure
Patch1:         numpy-1.9.0-remove-__declspec.patch
# PATCH-FIX-UPSTREAM don't use obsolete <xlocale.h>
Patch2:         xlocale.patch
BuildRequires:  python3-Sphinx
BuildRequires:  python3-devel
BuildRequires:  python3-matplotlib
BuildRequires:  python3-numpy-devel = %{version}
BuildRequires:  python3-numpydoc
BuildRequires:  python3-setuptools
BuildRequires:  unzip
BuildRequires:  zip
%if 0%{?suse_version}
BuildRequires:  fdupes
%endif
Provides:       python2-numpy-doc = %{version}
Provides:       python2-numpy-doc-html = %{version}
Provides:       python2-numpy-doc-pdf = %{version}
Provides:       python3-numpy-doc = %{version}
Provides:       python3-numpy-doc-html = %{version}
Provides:       python3-numpy-doc-pdf = %{version}
Obsoletes:      python2-numpy-doc-html < %{version}
Obsoletes:      python2-numpy-doc-pdf < %{version}
Obsoletes:      python3-numpy-doc-html < %{version}
Obsoletes:      python3-numpy-doc-pdf < %{version}
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildArch:      noarch

%description
NumPy is a general-purpose array-processing package designed to
efficiently manipulate large multi-dimensional arrays of arbitrary
records without sacrificing too much speed for small multi-dimensional
arrays.  NumPy is built on the Numeric code base and adds features
introduced by numarray as well as an extended C-API and the ability to
create arrays of arbitrary type which also makes NumPy suitable for
interfacing with general-purpose data-base applications.

There are also basic facilities for discrete fourier transform,
basic linear algebra and random number generation.

This package provides the documentation for NumPy


%prep
%setup -q -n numpy-%{version}
%patch0 -p1
%patch1 -p1
%patch2 -p1
# drop build date from doc to fix build-compare
sed -i "s/\(html_last_updated_fmt = \).*/\\1None/" doc/source/conf.py

%build
# make the documentation
pushd doc
make html PYVER=%{py3_ver}
popd

%install
# install the documentation
mkdir -p %{buildroot}%{_docdir}/python-numpy/
cp -r doc/build/html %{buildroot}%{_docdir}/python-numpy/
%if 0%{?suse_version}
%fdupes %{buildroot}%{_docdir}/python-numpy/html/
%endif

%files
%defattr(-,root,root)
%{_docdir}/python-numpy/

%changelog
openSUSE Build Service is sponsored by