%bcond_with dotests %global __tar /opt/freeware/bin/tar %global py_major 3.9 %global py_minor 16 %global python_major python%{py_major} %global pkgname sphinxcontrib-trio %global meta_package python3-%{pkgname} %global python3_sitearch %(%{python_major} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(0))") Name: %{python_major}-%{pkgname} Version: 1.1.0 Release: 2 Summary: sphinx extension to document python code License: MIT URL: https://pypi.python.org/pypi/%{pkgname} Source0: https://files.pythonhosted.org/packages/source/s/%{pkgname}/%{pkgname}-%{version}.tar.gz Patch0: tests-sphinx-build.patch BuildArch: noarch BuildRequires: %{python_major}-devel >= %{py_major}.%{py_minor} BuildRequires: %{python_major}-setuptools >= 65.2.0 Requires: %{python_major} >= %{py_major}.%{py_minor} Requires: %{python_major}-sphinx >= 2.3.0 %description This sphinx extension helps you document Python code that uses async/await, or abstract methods, or context managers, or generators, or ▒~@▒ you get the idea. It works by making sphinx▒~@~Ys regular directives for documenting Python functions and methods smarter and more powerful. The name is because it was originally written for the Trio project, and I▒~@~Ym not very creative. But don▒~@~Yt be put off ▒~@~S there▒~@~Ys nothing Trio- or async-specific about this extension; any Python project can benefit. %package -n %{meta_package} Summary: Meta-package for %{name} Requires: python3 >= %{py_major}.%{py_minor} Requires: %{name} = %{version}-%{release} Requires: python3-sphinx >= 2.3.0 %description -n %{meta_package} This is a Meta-package for %{name} package. %prep %autosetup -n %{pkgname}-%{version} -p1 %build export PATH=/opt/freeware/bin:$PATH %{python_major} setup.py build %install [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} %{python_major} setup.py install --root %{buildroot} %check %if %{with dotests} #python3 -m venv python_venv #. ./python_venv/bin/activate #pip3 install pytest #pip3 install hypothesis #ulimit -d unlimited #ulimit -n unlimited #ulimit -m unlimited # ulimit -f unlimited #( python runtests.py -m 'full' -v || true ) #deactivate %endif %clean [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} %files %defattr(-,root,system,-) %license LICENSE %doc README.rst %{python3_sitearch}/* %files -n %{meta_package} %defattr(-,root,system,-) #Empty %changelog * Fri Feb 24 2023 Reshma V Kumar - 1.1.0-2 - Sphinxcontrib-trio for python3.9