From ec8f4c6643b26ee131edc454d40419261b583fc1a46d5bcffaed7a496aaa93ed Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Wed, 20 Nov 2024 16:21:44 +0000 Subject: [PATCH] - update to 1.8.0: * Unify CLIs (#537). * Move "Attributes" and "Methods" below "Parameters" (#571). * FIX: coroutines can have a return statement (#542). * Unwrap decorated objects for YD01 validation check (#541). * Fix bug with validation encoding (#550). * Add note about TOML regex; fix typo (#552). * DOC: Clarify recommendations regarding use of backticks (#525). OBS-URL: https://build.opensuse.org/package/show/devel:languages:python:numeric/python-numpydoc?expand=0&rev=18 --- .gitattributes | 25 ++ .gitignore | 1 + numpydoc-1.7.0.tar.gz | 3 + numpydoc-1.8.0.tar.gz | 3 + numpydoc-pr523-py312deprecation.patch | 22 ++ python-numpydoc.changes | 487 ++++++++++++++++++++++++++ python-numpydoc.spec | 92 +++++ python-objects.inv | 3 + 8 files changed, 636 insertions(+) create mode 100644 .gitattributes create mode 100644 .gitignore create mode 100644 numpydoc-1.7.0.tar.gz create mode 100644 numpydoc-1.8.0.tar.gz create mode 100644 numpydoc-pr523-py312deprecation.patch create mode 100644 python-numpydoc.changes create mode 100644 python-numpydoc.spec create mode 100644 python-objects.inv diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..44014c4 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,25 @@ +## Default LFS +*.7z filter=lfs diff=lfs merge=lfs -text +*.bsp filter=lfs diff=lfs merge=lfs -text +*.bz2 filter=lfs diff=lfs merge=lfs -text +*.gem filter=lfs diff=lfs merge=lfs -text +*.gz filter=lfs diff=lfs merge=lfs -text +*.jar filter=lfs diff=lfs merge=lfs -text +*.lz filter=lfs diff=lfs merge=lfs -text +*.lzma filter=lfs diff=lfs merge=lfs -text +*.obscpio filter=lfs diff=lfs merge=lfs -text +*.oxt filter=lfs diff=lfs merge=lfs -text +*.pdf filter=lfs diff=lfs merge=lfs -text +*.png filter=lfs diff=lfs merge=lfs -text +*.rpm filter=lfs diff=lfs merge=lfs -text +*.tbz filter=lfs diff=lfs merge=lfs -text +*.tbz2 filter=lfs diff=lfs merge=lfs -text +*.tgz filter=lfs diff=lfs merge=lfs -text +*.ttf filter=lfs diff=lfs merge=lfs -text +*.txz filter=lfs diff=lfs merge=lfs -text +*.whl filter=lfs diff=lfs merge=lfs -text +*.xz filter=lfs diff=lfs merge=lfs -text +*.zip filter=lfs diff=lfs merge=lfs -text +*.zst filter=lfs diff=lfs merge=lfs -text +## Specific LFS patterns +python-objects.inv filter=lfs diff=lfs merge=lfs -text diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..57affb6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.osc diff --git a/numpydoc-1.7.0.tar.gz b/numpydoc-1.7.0.tar.gz new file mode 100644 index 0000000..7fac5be --- /dev/null +++ b/numpydoc-1.7.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:866e5ae5b6509dcf873fc6381120f5c31acf13b135636c1a81d68c166a95f921 +size 87575 diff --git a/numpydoc-1.8.0.tar.gz b/numpydoc-1.8.0.tar.gz new file mode 100644 index 0000000..b4ede03 --- /dev/null +++ b/numpydoc-1.8.0.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:022390ab7464a44f8737f79f8b31ce1d3cfa4b4af79ccaa1aac5e8368db587fb +size 90445 diff --git a/numpydoc-pr523-py312deprecation.patch b/numpydoc-pr523-py312deprecation.patch new file mode 100644 index 0000000..4fd5e0d --- /dev/null +++ b/numpydoc-pr523-py312deprecation.patch @@ -0,0 +1,22 @@ +From 543dbb1a19e372593197b6bbaa7f37d6bfd8bf8e Mon Sep 17 00:00:00 2001 +From: Chiara Marmo +Date: Tue, 9 Jan 2024 11:48:24 +0100 +Subject: [PATCH 1/3] Filter DeprecationWarning. + +--- + numpydoc/tests/test_validate.py | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/numpydoc/tests/test_validate.py b/numpydoc/tests/test_validate.py +index d41e4bd0..0671684b 100644 +--- a/numpydoc/tests/test_validate.py ++++ b/numpydoc/tests/test_validate.py +@@ -1348,6 +1348,7 @@ def test_bad_generic_functions(self, capsys, func): + assert isinstance(errors, list) + assert errors + ++ @pytest.mark.filterwarnings("ignore::DeprecationWarning") + @pytest.mark.parametrize( + "klass,func,msgs", + [ + diff --git a/python-numpydoc.changes b/python-numpydoc.changes new file mode 100644 index 0000000..dd89c75 --- /dev/null +++ b/python-numpydoc.changes @@ -0,0 +1,487 @@ +------------------------------------------------------------------- +Wed Nov 20 16:21:18 UTC 2024 - Dirk Müller + +- update to 1.8.0: + * Unify CLIs (#537). + * Move "Attributes" and "Methods" below "Parameters" (#571). + * FIX: coroutines can have a return statement (#542). + * Unwrap decorated objects for YD01 validation check (#541). + * Fix bug with validation encoding (#550). + * Add note about TOML regex; fix typo (#552). + * DOC: Clarify recommendations regarding use of backticks + (#525). + +------------------------------------------------------------------- +Wed Apr 3 07:51:01 UTC 2024 - Dirk Müller + +- update to 1.7.0: + * PERF: wrap inspect.getsourcelines with cache (#532). + * during tokenize, use UTF8 encoding on all platforms (#510). + * fix 'Alias for field number X' problem with NamedTuples + * DOC: Fix typos found by codespell (#514). + * DOC: Update link to mailing list (#518). + * Add Python 3.12 to classifiers (#529). + * Update release process (#534). + * Update release process (#535). + +------------------------------------------------------------------- +Thu Feb 29 19:29:26 UTC 2024 - Ben Greiner + +- Update to 1.6.0 + * Requires Python 3.8+ and Sphinx 5+. + ## Closed issues + * `numpydoc ignore` inline comment not recognized when using + decorators #495 + * Align pre-commit and Sphinx rule override syntax #466 + * Use pyproject.toml #473 + * circleci-artifacts-redirector-action error #469 + * Incorporate a pre-commit hook for numpydoc validation #450 + * PR06 fails when offending type name is used only as a substring + #446 + * style of [1] is strange in numpydoc docs #443 + * Double click on function parameter selects parameter type as + well #427 + ## Merged pull requests + * BUG: validator now handles properties #500 (sdiebolt) + * Fix clean_backref for extensions that have backrefs to inline + elements. #499 (mcmtroffaes) + * BUG: validator now handles decorators #496 (sdiebolt) + * TST: Test no-file for source #493 (larsoner) + * Update pydata-sphinx-theme #490 (jarrodmillman) + * Sync updates to generate_requirements.py from scikit-image #485 + (mwtoews) + * Generate requirements files from pyproject.toml #483 (mwtoews) + * Add token for artifact redirector #470 (jarrodmillman) + * Use rtd template (old method is deprecated) #468 + (jarrodmillman) + * Drop Python 3.7 #462 (jarrodmillman) + * Require Sphinx 5+ #461 (jarrodmillman) + * Pre-commit hook for running numpydoc validation #454 + (stefmolin) + * Change PR06 logic to only fail when type is used standalone + #447 (amoeba) +- Add numpydoc-pr523-py312deprecation.patch gh#numpy/numpydoc#523 + +------------------------------------------------------------------- +Sun Oct 9 19:18:50 UTC 2022 - Arun Persaud + +- specfile: + * require sphinx >= 4.2 + * require python >= 3.7 + +- update to version 1.5.0: + * Fixed bugs + + Parsing "returns" section with several types and no name + + BUG: Fix returns parsing no name + * Closed issues + + readthedocs build failing + + Exclude class properties from being listed under METHODS section + + BUG: Numpydoc doesn’t render attributes decorated with + "cached\_property" in the Attributes section + + Is numpydoc_use_blockquotes deprecated or not yet? + + No light theme available in docs + + 1.4.0 release plan + * Merged pull requests + + Update doc requirements + + Update pydata-sphinx-theme + + Support Python 3.11 + + Update precommit hooks + + Use Python 3.10 to build docs + + Use requirements/*.txt files for CI + + Fix front page + + Add cached property support + + ENH: Update validate.py to allow parameters with trailing + underscores. + + DOC: Use ":ref:" when referring to section headers + + Remove numpydoc_use_blockquotes + + Require sphinx>=4.2 (cleanup) + + docs: fix validation include line numbers + + Update precommit linters + + Update GH actions + + ENH: Add support for dict show_inherited_class_members + + DOC: Add theme switcher and default to lightmode. + + Require sphinx>=4.2 + +------------------------------------------------------------------- +Sun Aug 14 14:36:37 UTC 2022 - Arun Persaud + +- specfile: + * update copyright year + +- update to version 1.4.0: + * Remove pytest py3.11b2 workaround (#407) + * Fix CI (#410) + * Bump version + * Update GH actions (#406) + * Test docutils 0.18.1 (#402) + * Use node.findall if available (docutils 18.x) (#403) + * Add workaround for pytest failures on 3.11b2 (#404) + * Test prereleases of requirements (#395) + * Fix bug with version name (#400) + * Remove old warning filters (#398) + * Cleanup sphinx conf (#397) + * Update pre-commit (#396) + * Test on 3.11-dev (#375) + * Ignore black formatting (#394) + * Merge pull request #391 from jarrodmillman/black + * Use black formatter + +- changes from version 1.3.1: + * Update manifest (#388) + * Update doc requirements (#389) + +- changes from version 1.3.0: + * Update 1.3 release notes + * Update release process + * Require sphinx>3 (#385) + * Update tests + coverage config to rm warnings. (#383) + * MAINT: Dont import for version (#382) + * Runtime verification of sphinx and jinja2 versions (#381) + * DOC: fix broken link to built-in validation checks. (#379) + * Add pre-commit hook / linter (#374) + * Cleanup cruft (#371) + * Remove deprecated numpydoc_edit_link (#372) + +- changes from version 1.2.1: + * Update release notes + * Update year (#370) + * Upper bound jinja (#369) + * Use isgeneratorfunction to avoid overgenerating YD01 (#368) + * Fix AttributeError in underline length check (#363) + * Use consistent release tags (#361) + * Update release process + +- changes from version 1.2.0: + * Add 1.2 release notes (#359) + * Document release process (#357) + * Fix CI (#358) + * Use fstrings (#353) + * Require sphinx >= 1.8 (#352) + * Add badges (#354) + * Fix typos found by codespell (#343) + * Update deps (#350) + * Remove empty file (#351) + * Use setuptools instead of distutils (#349) + * Update supported Python versions (#348) + * Fix validation bug when parameter type is set of options. (#347) + * Escape newline in docstring. (#345) + * Avoid mutable default arguments (#342) + * Correctly validate parameters under the "Other Parameters" section (#337) + * Fix Warnings section in validate (#335) + * MAINT: Fix CircleCI (#336) + * Update install.rst (#332) + * MAINT: Python3 classes do not need to inherit from object (#325) + * FIX: Fix RTD + * DOC: Add headers to docstring sections to add link anchors (#320) + * Be explicit about leading * when documenting *args, **kwargs. (#310) + * Merge pull request #319 from larsoner/circle + * FIX: Missing links + * BUG: Fix navbar search pos + * MAINT: Make tinybuild + * MAINT: changes related to renaming default branch (#314) + * MAINT: use super() as described by PEP 3135 (#315) + * DOC: Switch docs to pydata-sphinx-theme (#313) + * DOC: Add section about validation via sphinx-build. (#312) + * ENH: Enable validation during sphinx-build process (#302) + * DOC: fix erroneous numpydoc_edit_link formatting (#309) + * document default values as part of the type spec (#289) + * Merge pull request #308 from rgommers/fix-missing-obj + * BUG: fix an incomplete check in `Reader._error_location` + * Merge pull request #295 from rossbar/xref_conf + * Merge pull request #272 from rossbar/maint/rm_codepath + * CI: Switch from travis to Github actions for tests (#307) + * Improve error messages for see also parsing (#306) + * Merge pull request #300 from WarrenWeckesser/long-see-also-entry + * Add a note to the docstring standard about long 'See Also' entries. + * Fix missing periods (#298) + * ALTERNATIVE: overload xref_ignore config value + * MAINT: minor refactoring in docscrape (#297) + * MAINT: pytest ignore doc directory. (#296) + * DOC: fix indentation error + * DOC: fix inaccuracy in validate docstring. (#294) + * DOC: document config value/kwarg + * Missed argument rename + * Add config value to control behavior + * WIP: kwarg to ignore unknown terms in make_xref. + * DOC: fix inaccuracy in validate docstring. + * Fix param parsing. (#286) + * MAINT: Updates related to xref (#292) + * BUG: Properly parse See Also when summary on first line. (#283) + * fix spliting of parameter lines. (#279) + * ENH: Better warning for sections. (#278) + * BUG: fix role regex. + * MAINT: Tick version + +------------------------------------------------------------------- +Tue Feb 23 20:31:36 UTC 2021 - Ben Greiner + +- Update to 1.1.0 + Implemented enhancements + * MAINT: Suggestions from reviewing test suite #271 (rossbar) + * DEV: Add testing requirements #267 (rossbar) + * BUG: Defer to autodoc for signatures #221 (thequackdaddy) + Fixed bugs + * function signatures for *args, **kwargs objects off #218 + * BUG: Connect to earlier event #269 (larsoner) + Closed issues + * “Handler for + event ‘autodoc-process-docstring’ threw an exception” #268 + * Timing of next release #249 + * self included in list of params for method #220 + * Additional notes + * Due to merging of #221, self and cls no longer will appear in method signatures. +- Release 1.0.0 + Implemented enhancements + * ENH: Add args and kwargs to example #258 (larsoner) + * MAINT,STY: Upgrade to bionic, and change style similar to + NumPy #253 (mwtoews) + * Delay import of Sphinx #248 (cgohlke) + * Adding –validate option __main__ and run new validation #240 + (datapythonista) + * Add docstring validation script (from pandas) #238 + (datapythonista) + * ENH: Test full output and coverage #230 (larsoner) + * DOC: Add description for blank lines after the docstring. #229 + (bingyao) + Fixed bugs + * References outside function #214 + * FIX: Get doc of actual class in test #262 (larsoner) + * TST: Add inherited method #260 (larsoner) + * Fixes references outside function (#214) #259 (Hoxbro) + * Disable escaping “*” on signature #256 (tk0miya) + * MAINT: clean-up unused objects #254 (mwtoews) + * STY: Reword first lines of example.py docstrings #246 + (justinludwig) + * DOC: Fixed three formatting issues in docs #245 (rossbar) + * STY Minor style improvements to doc/example.py to pass + validation #243 (rth) + * BUG: Allow no . at end if indented #239 (larsoner) + * DOC: Update links and code checkers info in format.rst #228 + (bingyao) + * DOC: Update links and info in conf.py. #227 (bingyao) + * BUG: Fix full rebuilds #226 (larsoner) + * MAINT: doctest and pytest #225 (larsoner) + * Py3fy some doctests. #224 (anntzer) + * MAINT: fix trivial source comment typos #222 (luzpaz) + * Add missing headings to code examples #252 (Cadair) + Removed + * MNT Drop Python 2.7 and 3.4 support #236 (rth) + Closed issues + * Prefix added to reference keys in class docstrings #263 + * Test failure with python 3.9 #261 + * sphinx doc napoleon extension maintainer interest request #251 + * Missing reference to float_power function in the ufunc list + #250 + Additional notes + * CSS styling changed from NumpyDoc < 0.8 and Sphinx < 2.0 to + more properly make use of definition lists. This can cause + issues with rendering that can be fixed via CSS, especially + when using sphinx-rtd-theme. +- Add python-objects.inv to provide the inventory locally for + tests +- Don't install matplotlib for tests + * it is not available for python 3.6 + * it is not used in tests because the doc directory is skipped + in all cases + +------------------------------------------------------------------- +Sat Jan 11 18:28:01 UTC 2020 - Arun Persaud + +- specfile: + * update copyright year + +- update to version 0.9.2: + * Delay import of Sphinx (#248) + +------------------------------------------------------------------- +Wed Jul 24 07:27:44 UTC 2019 - Tomáš Chvátal + +- Do not pull both nose and pytest, just stick with pytest + +------------------------------------------------------------------- +Tue Jul 23 17:56:18 UTC 2019 - Todd R + +- Update to version 0.9.1 + * Updating minimum sphinx version in setup.py +- Update to version 0.9.0 + * CI: bump minimum Sphinx version tested from 1.2.3 to 1.6.5 + * report object name upon mangle_docstrings exception + * ENH: Just use obj + * FIX: Opt-in, test, uniform styling, css + * Add cross-reference links to parameter types + * ENH: Allow a trailing COMMA or PERIOD in a See Also function list block. + * FIX parsing of type-only return params + * ENH: Added support for multiple functions+description + * ENH: accept autoclass member options + * Support Receives section for generator.send(...) params + * Use DEDUPLICATION_TAG to determine whether a citation node is + in a docstring + * ENH Only print the index if it is necessary. + * Clarify location of certain invalid docstrings. + * BUG: turn member descriptors into links + * FIX: Escape chars in re + * MNT Fix collections.abc imports + * FIX pedantic handling of whitespace in reference regex + * FIX remove duplicated citation back-references + * Move arg and kwargs escaping to docscrape_sphinx + * Escape the * in *args and **kwargs + +------------------------------------------------------------------- +Sun Apr 29 04:11:15 UTC 2018 - arun@gmx.de + +- specfile: + * update copyright year + * require Jinja (from setup.py) + * always run tests + +- update to version 0.8.0: + * DOC: update URL to documentation in setup.py + * Use isdatadescriptor instead of isgetsetdescriptor + * Ensure reference renaming is parallel-safe (#136) + * Simplify and restructure README + * Automatically load autosummary (#143) + * FIX Handle case where description is empty in returns (#148) + * FIX handling of parameter names ending '_' + * Handle case where description is empty (#140) + * Correct deduplication logic + * Make sure case when class + method docstrings are combined is not + reprocessed + * Avoid reprocessing already numpydocced docstrings + * DOC Use .. deprecated for deprecation instead of .. note (#120) + * Add required arg to setup so that nose does not call it + * Cosmetic and efficiency improvements to replace_referneces (#132) + * Remove comment autosummary from _str_param_list + * Flake8 + * Make version available to Python without dependencies; and to + Sphinx metadata + * Test use_blockquotes config + * Leading and trailing blank lines in parameter description should + not affect output + * Stricter comparison of whitespace in testing + * Corret search syntax + * Use definition lists rather than blockquotes + * Support from matplotlib import as alias for import matplotlib + * only recommend inline form + * add documentation on hyperlinks + * DOC: fix syntax error in deprecated of numpydoc_edit_link (#122) + * DOC Note on section ordering, and add missing sections + * DOC Fix link + * DOC: Restore working conf.py + * DOC: cross-link to github from documentation + * Add doc build requirements file for readthedocs + * Corrected rtd url + * Older versions of sphinx do not have imgmath + * DOC: pipe README.rst contents into "long_description", for PyPI + frontpage + * MAINT: update ReST formatting in README. + * Basic docs based on Numpy's HOW_TO_DOCUMENT.rst.txt + * Allow see also object ref to incorporate ~ prefix + +------------------------------------------------------------------- +Sat Sep 30 18:18:29 UTC 2017 - arun@gmx.de + +- update to version 0.7.0: + * make tests run under python2.7 + * less hacky solution to duplicate section error message, added + tests + * make getting filename python2 compatible + * add context to signature mangling errors + * MAINT: set version number to 0.7.0.dev0 + * Fix regression in #81 + * BUG: Make docscrape ParseError Python 3 compatible. + * TST: update test for change in gh-81. + * MAINT: set minimum Sphinx version to 1.2.3, remove linkcode + extension. + * TST: run tests on TravisCI with Python 3.6 instead of 3.5 + * TST: run test suite after installing via sdist. + * BUG: fix installing numydoc, broken with missing templates after + gh-77. + * Added ..currentmodule:: before ..autosummary:: + * Add dependency on jinja2 + * MAINT: add PyPI classifier for Python 3.6, remove Python 2.6 / 3.3 + * Render numpydoc strings from a template + * Add __version__ attribute + * ENH: use __text_signature__ if pydoc.doc does not reveal a + signature. + * Remove non Python3 compatible files + * add (possibly slightly off) source lines to mangled docstrings. + * FIX Unknow sections should not raise an error + * MAINT Added *.swp and *.swo to gitignore + * FIX raises an error if a section appears twice + * adjust tests + * bold attributes so we don't have to deal with trailing + underscores. Also looks better. + * BLD: fix sphinx version req + * Use setuptools 'install_requires' instead of 'requires' in + setup.py. + * change to deep copy for doc sections. + * allow extending NumpyDocString sections + * Make default citation pattern more general + * Make citation pattern configurable + * Avoid sorting references by length while renaming + * Factor out function to rename references +------------------------------------------------------------------- +Wed May 17 21:42:03 UTC 2017 - toddrme2178@gmail.com + +- Implement single-spec version. +- Fix source URL. + +------------------------------------------------------------------- +Fri Jan 20 21:04:08 UTC 2017 - toddrme2178@gmail.com + +- update to version 0.6.0: + * REL: use the distutils sdist command instead of the setuptools + one. + * numpydoc.docscrape: Restore support for Python 3.4. + * CI: run Travis on Sphinx 1.2.x and latest + * better error messages from NumpyDocString + * MAINT inspect.getfullargspec is deprecated in Py3.5 + * return extension metadata + * CI: fix travis pip install + add caching + * BUG: fix spacing in sphinx class doc attribute listing + * PEP8 fixes for docscrape_sphinx.py + * PEP8 fixes for docscrape.py + * PEP8 fixes for numpydoc.py + * MAINT: More explicit call while building docstrings. + * TST: More unit tests for the Yields section. + * ENH: Raise exception if docstring contains Returns and Yields. + * TST : removed print statement + * ENH : simplify handling of Yield section + * Add support for Yields for sphinx strings as well. + * Add unit test for Yields section. + * ENH : NumpyDocString subclass collections.Mapping + * Support Yields section in traitsdoc too. + * Support Yields section. + +------------------------------------------------------------------- +Thu May 7 18:52:25 UTC 2015 - benoit.monin@gmx.fr + +- update to version 0.5: + * no changelog available +- update project URL +- add python-matplotlib and python-nose as test requirements +- remove all update-alternatives logic since autosummary_generate + is not provided anymore +- pass -q to test to avoid spamming the build log +- rename README.txt to README.rst: changed upstream + +------------------------------------------------------------------- +Sat Nov 08 20:43:00 UTC 2014 - Led + +- fix bashism in pre script + +------------------------------------------------------------------- +Thu Oct 31 12:25:04 UTC 2013 - toddrme2178@gmail.com + +- Implement update-alternatives + +------------------------------------------------------------------- +Thu Aug 15 07:56:39 UTC 2013 - speilicke@suse.com + +- Rename spec / changes file to project name + +------------------------------------------------------------------- +Mon Aug 12 14:34:02 UTC 2013 - speilicke@suse.com + +- Initial version + diff --git a/python-numpydoc.spec b/python-numpydoc.spec new file mode 100644 index 0000000..ffbc16f --- /dev/null +++ b/python-numpydoc.spec @@ -0,0 +1,92 @@ +# +# spec file for package python-numpydoc +# +# Copyright (c) 2024 SUSE LLC +# +# 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 https://bugs.opensuse.org/ +# + + +Name: python-numpydoc +Version: 1.8.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 +# https://docs.python.org/3/objects.inv (changes from time to time, accessed 2024-02-29) +Source1: python-objects.inv +# PATCH-FIX-UPSTREAM numpydoc-pr523-py312deprecation.patch gh#numpy/numpydoc#523 +Patch0: numpydoc-pr523-py312deprecation.patch +BuildRequires: %{python_module Jinja2 >= 2.10} +BuildRequires: %{python_module Sphinx >= 5} +BuildRequires: %{python_module base >= 3.8} +BuildRequires: %{python_module pip} +BuildRequires: %{python_module setuptools} +BuildRequires: %{python_module tabulate >= 0.8.10} +BuildRequires: %{python_module tomli >= 1.1.0 if %python-base < 3.11} +BuildRequires: %{python_module wheel} +BuildRequires: fdupes +BuildRequires: python-rpm-macros +Requires(post): update-alternatives +Requires(postun): update-alternatives +Requires: python-Jinja2 >= 2.10 +Requires: python-Sphinx >= 5 +Requires: python-tabulate >= 0.8.10 +Requires: (python-tomli if python-base < 3.11) +BuildArch: noarch +# SECTION test requirements +BuildRequires: %{python_module pytest} +BuildRequires: %{python_module matplotlib} +# /SECTION +%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 +%autosetup -p1 -n numpydoc-%{version} +# remove interpreter line. This script has no main section +sed -i '1 {/env python/ d}' numpydoc/validate.py +# don't check coverage +sed -i 's/--cov[^ ]*//g' pyproject.toml +# provide the python doc inventory locally +sed -i "\|https://docs.python.org/3| s|None|'%{SOURCE1}'|" numpydoc/tests/tinybuild/conf.py + +%build +%pyproject_wheel + +%install +%pyproject_install +%python_clone -a %{buildroot}%{_bindir}/numpydoc +%python_expand %fdupes %{buildroot}%{$python_sitelib} + +%check +%pytest + +%post +%python_install_alternative numpydoc + +%postun +%python_uninstall_alternative numpydoc + +%files %{python_files} +%license LICENSE.txt +%doc README.rst +%python_alternative %{_bindir}/numpydoc +%{python_sitelib}/numpydoc/ +%{python_sitelib}/numpydoc-%{version}.dist-info + +%changelog diff --git a/python-objects.inv b/python-objects.inv new file mode 100644 index 0000000..6d3d843 --- /dev/null +++ b/python-objects.inv @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3319119a5750071fe6990a2a8e4c649993b9ad1e22aa8fcd37226c9c8d7aeb09 +size 136102