2019-03-22 11:14:22 +01:00
|
|
|
#
|
|
|
|
# spec file for package python-sphinx-autodoc-typehints
|
|
|
|
#
|
2022-05-05 12:40:05 +02:00
|
|
|
# Copyright (c) 2022 SUSE LLC
|
2019-03-22 11:14:22 +01: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-03-23 16:56:31 +01:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
|
|
|
#
|
2019-03-22 11:14:22 +01:00
|
|
|
|
|
|
|
|
|
|
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
|
|
|
%define skip_python2 1
|
2022-05-09 16:09:48 +02:00
|
|
|
%define modname sphinx_autodoc_typehints
|
|
|
|
|
2019-03-22 11:14:22 +01:00
|
|
|
Name: python-sphinx-autodoc-typehints
|
2022-05-05 12:40:05 +02:00
|
|
|
Version: 1.18.1
|
2019-03-22 11:14:22 +01:00
|
|
|
Release: 0
|
|
|
|
Summary: Type hints (PEP 484) support for the Sphinx autodoc extension
|
2019-03-23 16:56:31 +01:00
|
|
|
License: MIT
|
2019-03-22 11:14:22 +01:00
|
|
|
Group: Development/Languages/Python
|
2019-07-03 11:14:31 +02:00
|
|
|
URL: https://github.com/agronholm/sphinx-autodoc-typehints
|
2022-05-05 12:40:05 +02:00
|
|
|
Source: https://files.pythonhosted.org/packages/source/s/sphinx-autodoc-typehints/sphinx_autodoc_typehints-%{version}.tar.gz
|
|
|
|
# PATCH-FIX-OPENSUSE python-sphinx-autodoc-typehints-system-object.inv.patch gh#agronholm/sphinx-autodoc-typehints#174 mcepl@suse.com
|
|
|
|
# Don't download inventory from the Internet, but use the local one.
|
2021-04-23 18:21:14 +02:00
|
|
|
Patch0: python-sphinx-autodoc-typehints-system-object.inv.patch
|
2019-03-22 11:14:22 +01:00
|
|
|
BuildRequires: %{python_module setuptools >= 36.2.7}
|
|
|
|
BuildRequires: %{python_module setuptools_scm >= 1.7.0}
|
|
|
|
BuildRequires: fdupes
|
2019-03-23 16:56:31 +01:00
|
|
|
BuildRequires: python-rpm-macros
|
2019-07-03 11:14:31 +02:00
|
|
|
Requires: python-Sphinx >= 1.7
|
|
|
|
Requires: python-typing_extensions
|
|
|
|
BuildArch: noarch
|
2019-03-22 11:14:22 +01:00
|
|
|
# SECTION tests
|
|
|
|
BuildRequires: %{python_module Sphinx >= 1.7}
|
2020-03-09 09:51:39 +01:00
|
|
|
BuildRequires: %{python_module doc}
|
2022-05-09 16:05:14 +02:00
|
|
|
BuildRequires: %{python_module nptyping}
|
2019-03-22 11:14:22 +01:00
|
|
|
BuildRequires: %{python_module pathlib}
|
2019-03-23 16:56:31 +01:00
|
|
|
BuildRequires: %{python_module pytest}
|
2020-03-09 09:51:39 +01:00
|
|
|
BuildRequires: %{python_module sphobjinv}
|
2019-03-22 11:14:22 +01:00
|
|
|
BuildRequires: %{python_module typing_extensions}
|
|
|
|
# /SECTION
|
|
|
|
%python_subpackages
|
|
|
|
|
|
|
|
%description
|
|
|
|
This is a Sphinx extension which allows to use Python 3 annotations for documenting acceptable argument types
|
|
|
|
and return value types of functions.
|
|
|
|
|
|
|
|
%prep
|
2022-05-05 12:40:05 +02:00
|
|
|
%autosetup -p1 -n sphinx_autodoc_typehints-%{version}
|
2019-03-22 11:14:22 +01:00
|
|
|
|
|
|
|
%build
|
|
|
|
%python_build
|
2021-04-23 18:21:14 +02:00
|
|
|
%python_expand sed -i -e 's/@PYTHON_VERSION@/%{$python_version}/' tests/conftest.py
|
2019-03-22 11:14:22 +01:00
|
|
|
|
|
|
|
%install
|
|
|
|
%python_install
|
|
|
|
%python_expand %fdupes %{buildroot}%{$python_sitelib}
|
|
|
|
|
|
|
|
%check
|
2019-09-10 12:06:41 +02:00
|
|
|
# test_sphinx_output -- too depenedent on sphinx version available
|
2022-05-09 16:05:14 +02:00
|
|
|
# gh#tox-dev/sphinx-autodoc-typehints#229
|
|
|
|
%pytest -k 'not (test_sphinx_output or test_format_annotation)'
|
2019-03-22 11:14:22 +01:00
|
|
|
|
|
|
|
%files %{python_files}
|
|
|
|
%license LICENSE
|
2022-05-09 16:05:14 +02:00
|
|
|
%doc README.md CHANGELOG.md
|
2022-05-09 16:09:48 +02:00
|
|
|
%{python_sitelib}/%{modname}-%{version}*-info
|
|
|
|
%{python_sitelib}/%{modname}
|
2019-03-22 11:14:22 +01:00
|
|
|
|
|
|
|
%changelog
|