2013-11-13 11:44:33 +00:00
|
|
|
#
|
|
|
|
# spec file for package python-numpydoc
|
|
|
|
#
|
2024-03-01 18:07:17 +00:00
|
|
|
# Copyright (c) 2024 SUSE LLC
|
2013-11-13 11:44:33 +00:00
|
|
|
#
|
|
|
|
# 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.
|
|
|
|
|
2019-07-24 18:35:22 +00:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2014-11-18 21:45:05 +00:00
|
|
|
#
|
2013-11-13 11:44:33 +00:00
|
|
|
|
|
|
|
|
|
|
|
Name: python-numpydoc
|
2024-04-03 07:54:28 +00:00
|
|
|
Version: 1.7.0
|
2013-11-13 11:44:33 +00:00
|
|
|
Release: 0
|
|
|
|
Summary: Sphinx extension to support docstrings in Numpy format
|
2014-11-18 21:45:05 +00:00
|
|
|
License: BSD-3-Clause
|
2013-11-13 11:44:33 +00:00
|
|
|
Group: Development/Languages/Python
|
2018-04-30 20:56:56 +00:00
|
|
|
URL: https://github.com/numpy/numpydoc
|
2017-05-18 18:51:22 +00:00
|
|
|
Source: https://files.pythonhosted.org/packages/source/n/numpydoc/numpydoc-%{version}.tar.gz
|
2024-03-01 18:07:17 +00:00
|
|
|
# https://docs.python.org/3/objects.inv (changes from time to time, accessed 2024-02-29)
|
2021-02-23 21:01:33 +00:00
|
|
|
Source1: python-objects.inv
|
2024-03-01 18:07:17 +00:00
|
|
|
# PATCH-FIX-UPSTREAM numpydoc-pr523-py312deprecation.patch gh#numpy/numpydoc#523
|
|
|
|
Patch0: numpydoc-pr523-py312deprecation.patch
|
2022-08-15 07:11:40 +00:00
|
|
|
BuildRequires: %{python_module Jinja2 >= 2.10}
|
2024-03-01 18:07:17 +00:00
|
|
|
BuildRequires: %{python_module Sphinx >= 5}
|
|
|
|
BuildRequires: %{python_module base >= 3.8}
|
|
|
|
BuildRequires: %{python_module pip}
|
2017-05-18 18:51:22 +00:00
|
|
|
BuildRequires: %{python_module setuptools}
|
2024-03-01 18:07:17 +00:00
|
|
|
BuildRequires: %{python_module tabulate >= 0.8.10}
|
|
|
|
BuildRequires: %{python_module tomli >= 1.1.0 if %python-base < 3.11}
|
|
|
|
BuildRequires: %{python_module wheel}
|
2017-10-09 17:40:50 +00:00
|
|
|
BuildRequires: fdupes
|
|
|
|
BuildRequires: python-rpm-macros
|
2024-03-01 18:07:17 +00:00
|
|
|
Requires(post): update-alternatives
|
|
|
|
Requires(postun): update-alternatives
|
2022-08-15 07:11:40 +00:00
|
|
|
Requires: python-Jinja2 >= 2.10
|
2024-03-01 18:07:17 +00:00
|
|
|
Requires: python-Sphinx >= 5
|
|
|
|
Requires: python-tabulate >= 0.8.10
|
|
|
|
Requires: (python-tomli if python-base < 3.11)
|
2013-11-13 11:44:33 +00:00
|
|
|
BuildArch: noarch
|
2020-01-13 08:39:12 +00:00
|
|
|
# SECTION test requirements
|
|
|
|
BuildRequires: %{python_module pytest}
|
2024-03-01 18:07:17 +00:00
|
|
|
BuildRequires: %{python_module matplotlib}
|
2020-01-13 08:39:12 +00:00
|
|
|
# /SECTION
|
2017-05-18 18:51:22 +00:00
|
|
|
%python_subpackages
|
2013-11-13 11:44:33 +00:00
|
|
|
|
|
|
|
%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
|
2024-03-01 18:07:17 +00:00
|
|
|
%autosetup -p1 -n numpydoc-%{version}
|
2021-02-23 21:01:33 +00:00
|
|
|
# remove interpreter line. This script has no main section
|
|
|
|
sed -i '1 {/env python/ d}' numpydoc/validate.py
|
|
|
|
# don't check coverage
|
2024-03-01 18:07:17 +00:00
|
|
|
sed -i 's/--cov[^ ]*//g' pyproject.toml
|
2021-02-23 21:01:33 +00:00
|
|
|
# provide the python doc inventory locally
|
2022-08-15 07:11:40 +00:00
|
|
|
sed -i "\|https://docs.python.org/3| s|None|'%{SOURCE1}'|" numpydoc/tests/tinybuild/conf.py
|
2013-11-13 11:44:33 +00:00
|
|
|
|
|
|
|
%build
|
2024-03-01 18:07:17 +00:00
|
|
|
%pyproject_wheel
|
2013-11-13 11:44:33 +00:00
|
|
|
|
|
|
|
%install
|
2024-03-01 18:07:17 +00:00
|
|
|
%pyproject_install
|
|
|
|
%python_clone -a %{buildroot}%{_bindir}/validate-docstrings
|
2017-05-18 18:51:22 +00:00
|
|
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
2013-11-13 11:44:33 +00:00
|
|
|
|
|
|
|
%check
|
2024-03-01 18:07:17 +00:00
|
|
|
%pytest
|
|
|
|
|
|
|
|
%post
|
|
|
|
%python_install_alternative validate-docstrings
|
|
|
|
|
|
|
|
%postun
|
|
|
|
%python_uninstall_alternative validate-docstrings
|
2013-11-13 11:44:33 +00:00
|
|
|
|
2017-05-18 18:51:22 +00:00
|
|
|
%files %{python_files}
|
2018-04-30 20:56:56 +00:00
|
|
|
%license LICENSE.txt
|
|
|
|
%doc README.rst
|
2024-03-01 18:07:17 +00:00
|
|
|
%python_alternative %{_bindir}/validate-docstrings
|
2013-11-13 11:44:33 +00:00
|
|
|
%{python_sitelib}/numpydoc/
|
2024-03-01 18:07:17 +00:00
|
|
|
%{python_sitelib}/numpydoc-%{version}.dist-info
|
2013-11-13 11:44:33 +00:00
|
|
|
|
|
|
|
%changelog
|