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

#
# spec file for package python-numpy-doc
#
# Copyright (c) 2014 SUSE LINUX Products 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/
#


%define modname numpy
Name:           python-%{modname}-doc
%define docname numpydoc
Version:        1.8.0
Release:        0
%define docvers 0.4
Url:            http://sourceforge.net/projects/numpy
Summary:        Documentation for python-numpy
License:        BSD-3-Clause
Group:          Development/Libraries/Python
Source:         %{modname}-%{version}.tar.gz
Patch0:         numpy-buildfix.patch
Patch1:         numpy-double-double-le.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  blas-devel
BuildRequires:  lapack-devel
BuildRequires:  python-Sphinx
BuildRequires:  python-devel
BuildRequires:  python-matplotlib
BuildRequires:  python-numpy-devel
BuildRequires:  python-numpydoc
BuildRequires:  texlive-latex
BuildRequires:  zip
%if 0%{?suse_version}
BuildRequires:  fdupes
BuildRequires:  gcc-fortran
%if 0%{?suse_version} <= 1110
%{!?python_sitelib: %global python_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
%else
BuildArch:      noarch
%py_requires
%endif
%else
BuildRequires:  gcc-gfortran
%endif

%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

%package html
Summary:        HTML documentation for python-%{modname}
Group:          Development/Libraries/Python
Recommends:     python-%{modname} = %{version}

%description html
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 HTML documentation for NumPy

%package pdf
Summary:        PDF documentation for python-%{modname}
Group:          Development/Libraries/Python
Recommends:     python-%{modname} = %{version}

%description pdf
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 PDF documentation for NumPy


%prep
%setup -q -n %{modname}-%{version}
%patch0 -p1
%patch1 -p1

%build
# make the documentation
cd doc 
make dist PYVER=%{py_ver}

%install
# install the documentation
cd doc
mkdir -p %{buildroot}%{_docdir}/python-%{modname}/{html,pdf}
tar -xzf build/dist.tar.gz -C %{buildroot}%{_docdir}/python-%{modname}/html
mv %{buildroot}%{_docdir}/python-%{modname}/html/*.pdf %{buildroot}%{_docdir}/python-%{modname}/pdf/

%fdupes %{buildroot}%{_docdir}/python-%{modname}/html/
%fdupes %{buildroot}%{_docdir}/python-%{modname}/pdf/

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

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

%changelog
openSUSE Build Service is sponsored by