%global srcname sphinx-autodoc-typehints %global altname sphinx_autodoc_typehints %global common_description %{expand: This extension allows you to use Python 3 annotations for documenting acceptable argument types and return value types of functions.} %global python3_pkgversion 3.11 Name: python-%{srcname} Version: 1.18.3 Release: 2.ac12.py3.11%{?dist} Summary: Type hints support for the Sphinx autodoc extension License: MIT URL: https://github.com/tox-dev/sphinx-autodoc-typehints Source0: %{url}/archive/%{version}/%{srcname}-%{version}.tar.gz BuildArch: noarch BuildRequires: python%{python3_pkgversion}-devel BuildRequires: python%{python3_pkgversion}dist(pytest) BuildRequires: python%{python3_pkgversion}dist(nptyping) BuildRequires: python%{python3_pkgversion}dist(sphobjinv) BuildRequires: python%{python3_pkgversion}dist(typish) %description %{common_description} %package -n python%{python3_pkgversion}-%{srcname} Summary: %{summary} Requires: python%{python3_pkgversion}-sphinx %description -n python%{python3_pkgversion}-%{srcname} %{common_description} %prep %autosetup -p1 -n %{srcname}-%{version} %generate_buildrequires export SETUPTOOLS_SCM_PRETEND_VERSION=%{version} %pyproject_buildrequires %build export SETUPTOOLS_SCM_PRETEND_VERSION=%{version} %pyproject_wheel %install export SETUPTOOLS_SCM_PRETEND_VERSION=%{version} %pyproject_install %pyproject_save_files %{altname} # %%check # %%pytest for b in $(find %{buildroot}%{_bindir}/ -type f) ; do mv "$b" $(sed -re "s|(.*)$|\1-%{python3_pkgversion}|"<<<"$b"); done for m in $(find %{buildroot}%{_mandir}/ -type f) ; do mv "$m" $(sed -re "s|(.*).([1-8])(.*)$|\1-%{python3_pkgversion}.\2\3|"<<<"$m"); done for m in $(find %{buildroot}%{_datadir}/locale/* -type f) ; do mv "$m" $(sed -re "s|(.*).mo$|\1-%{python3_pkgversion}.mo|"<<<"$m"); done for l in $(find %{buildroot}/usr/lib64/lib* -type f -o -type l) ; do mv "$l" $(sed -re "s|(.*).so(.*)$|\1-py%{python3_pkgversion}.so\2|"<<<"$l"); done for p in $(find %{buildroot}/usr/lib64/pkgconfig/* -type f) ; do mv "$p" $(sed -re "s|(.*).pc$|\1-py%{python3_pkgversion}.pc|"<<<"$p"); done %files -n python%{python3_pkgversion}-%{srcname} -f %{pyproject_files} %changelog * Sun Apr 14 2024 Ding-Yi Chen - 1.18.3-2.ac12.py3.11 - Cut corner packaging