%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 sphinx %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: 2.3.0 Release: 2 Summary: Python documentation generator License: BSD URL: https://pypi.python.org/pypi/%{pkgname} Source0: https://files.pythonhosted.org/packages/source/s/%{pkgname}/Sphinx-%{version}.tar.gz 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}-alabaster >= 0.7.12 Requires: %{python_major}-babel >= 2.7.0 Requires: %{python_major}-docutils >= 0.12 Requires: %{python_major}-imagesize >= 1.1.0 Requires: %{python_major}-jinja2 >= 2.10.3 Requires: %{python_major}-packaging >= 19.2 Requires: %{python_major}-pygments >= 2.4.2 Requires: %{python_major}-requests >= 2.22.0 Requires: %{python_major}-snowballstemmer >= 2.0.0 Requires: %{python_major}-sphinxcontrib-applehelp >= 1.0.1 Requires: %{python_major}-sphinxcontrib-devhelp >= 1.0.1 Requires: %{python_major}-sphinxcontrib-htmlhelp >= 1.0.2 Requires: %{python_major}-sphinxcontrib-jsmath >= 1.0.1 Requires: %{python_major}-sphinxcontrib-qthelp >= 1.0.2 Requires: %{python_major}-sphinxcontrib-serializinghtml >= 1.1.3 %description Sphinx is a tool that makes it easy to create intelligent and beautiful documentation for Python projects (or other documents consisting of multiple reStructuredText sources), written by Georg Brandl. It was originally created for the new Python documentation, and has excellent facilities for Python project documentation, but C/C++ is supported as well, and more languages are planned. Sphinx uses reStructuredText as its markup language, and many of its strengths come from the power and straightforwardness of reStructuredText and its parsing and translating suite, the Docutils. Among its features are the following: * Output formats: HTML (including derivative formats such as HTML Help, Epub and Qt Help), plain text, manual pages and LaTeX or direct PDF output using rst2pdf * Extensive cross-references: semantic markup and automatic links for functions, classes, glossary terms and similar pieces of information * Hierarchical structure: easy definition of a document tree, with automatic links to siblings, parents and children * Automatic indices: general index as well as a module index * Code handling: automatic highlighting using the Pygments highlighter * Flexible HTML output using the Jinja 2 templating engine * Various extensions are available, e.g. for automatic testing of snippets and inclusion of appropriately formatted docstrings * Setuptools integration A development egg can be found `here `_. %package -n %{meta_package} Summary: Meta-package for %{name} Requires: python3 >= %{py_major}.%{py_minor} Requires: %{name} = %{version}-%{release} Requires: python3-alabaster >= 0.7.12 Requires: python3-babel >= 2.7.0 Requires: python3-docutils >= 0.12 Requires: python3-imagesize >= 1.1.0 Requires: python3-jinja2 >= 2.10.3 Requires: python3-packaging >= 19.2 Requires: python3-pygments >= 2.4.2 Requires: python3-requests >= 2.22.0 Requires: python3-snowballstemmer >= 2.0.0 Requires: python3-sphinxcontrib-applehelp >= 1.0.1 Requires: python3-sphinxcontrib-devhelp >= 1.0.1 Requires: python3-sphinxcontrib-htmlhelp >= 1.0.2 Requires: python3-sphinxcontrib-jsmath >= 1.0.1 Requires: python3-sphinxcontrib-qthelp >= 1.0.2 Requires: python3-sphinxcontrib-serializinghtml >= 1.1.3 %description -n %{meta_package} This is a Meta-package for %{name} package. %prep %autosetup -n Sphinx-%{version} %build export PATH=/opt/freeware/bin:$PATH %{python_major} setup.py build export PYTHONPATH=`pwd` cd doc make text %install [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} %{python_major} setup.py install --root %{buildroot} #renaming the files in bindir to avoid conflict with python-sphinx cd ${RPM_BUILD_ROOT}/%{_bindir} for file in *; do mv $file $file-3.9 ln -sf $file-3.9 $file-3 ln -sf $file-3.9 $file done %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 AUTHORS CHANGES EXAMPLES README.rst %doc doc/_build/text %{_bindir}/*3.9 %{python3_sitearch}/* %files -n %{meta_package} %defattr(-,root,system,-) %{_bindir}/* %exclude %{_bindir}/*3.9 %changelog * Tue Mar 07 2023 Reshma V Kumar - 2.3.0-2 - Sphinx for python3.9