File python-numpydoc.spec of Package python-numpydoc

#
# spec file for package python-numpydoc
#
# Copyright (c) 2017 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/
#


%bcond_without tests

%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name:           python-numpydoc
Version:        0.7.0
Release:        0
Summary:        Sphinx extension to support docstrings in Numpy format
License:        BSD-3-Clause
Group:          Development/Languages/Python
Url:            https://github.com/numpy/numpydoc
Source:         https://files.pythonhosted.org/packages/source/n/numpydoc/numpydoc-%{version}.tar.gz
BuildRequires:  %{python_module devel >= 2.7.7}
BuildRequires:  %{python_module setuptools}
BuildRequires:  fdupes
BuildRequires:  python-rpm-macros
%if %{with tests}
BuildRequires:  %{python_module Sphinx >= 1.0.1}
BuildRequires:  %{python_module matplotlib}
BuildRequires:  %{python_module nose}
%endif
Requires:       python-Sphinx >= 1.0.1
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildArch:      noarch
%python_subpackages

%description
Numpy's documentation uses several custom extensions to Sphinx.  These
are shipped in this numpydoc package, in case you want to make use
of them in third-party projects.

%prep
%setup -q -n numpydoc-%{version}

%build
%python_build

%install
%python_install
%python_expand %fdupes %{buildroot}%{$python_sitelib}

%if %{with tests}
%check
%python_exec setup.py -q test
%endif

%files %{python_files}
%defattr(-,root,root,-)
%doc LICENSE.txt README.rst
%{python_sitelib}/numpydoc/
%{python_sitelib}/numpydoc-%{version}-py*.egg-info

%changelog