%{!?dotests: %define dotests 1} %define name python3-sphinx %define srcname Sphinx %define version 2.3.0 %define release 1 %global __tar /opt/freeware/bin/tar %define is_python %(test -e /opt/freeware/bin/python3_32 && echo 1 || echo 0) %if %{is_python} %define python_sitelib %(python3_32 -c "from distutils.sysconfig import get_python_lib; print (get_python_lib(1))") %endif %define _libdir64 %{_prefix}/lib %define is_python_64 %(test -e /usr/bin/python3_64 && echo 1 || echo 0) %if %{is_python_64} %define python_sitelib64 %(python3 -c "from distutils.sysconfig import get_python_lib; print (get_python_lib(1))") %endif Summary: Python documentation generator Name: %{name} Version: %{version} Release: %{release} Source0: %{srcname}-%{version}.tar.gz License: BSD Group: Development/Libraries Prefix: %{_prefix} BuildArch: ppc Vendor: Georg Brandl Url: http://sphinx.pocoo.org/ BuildRequires: python3 >= 3.7.3, python3-devel >= 3.7.3 BuildRequires: python3-babel >= 2.7.0 BuildRequires: python3-packaging >= 19.2 BuildRequires: python3-imagesize >= 1.1.0 BuildRequires: python3-jinja2 >= 2.10.3 BuildRequires: python3-sphinxcontrib-applehelp >= 1.0.1 BuildRequires: python3-sphinxcontrib-devhelp >= 1.0.1 BuildRequires: python3-sphinxcontrib-qthelp >= 1.0.2 BuildRequires: python3-sphinxcontrib-serializinghtml >= 1.1.3 BuildRequires: python3-sphinxcontrib-htmlhelp >= 1.0.2 BuildRequires: python3-docutils >= 0.12 BuildRequires: python3-alabaster >= 0.7.12 BuildRequires: python3-requests >= 2.22.0 BuildRequires: python3-snowballstemmer >= 2.0.0 BuildRequires: python3-sphinxcontrib-jsmath >= 1.0.1 BuildRequires: python3-pytest >= 5.3.1 Requires: python3 >= 3.7.3 Requires: python3-pygments >= 2.4.2 Requires: python3-docutils >= 0.12 Requires: python3-alabaster >= 0.7.12 Requires: python3-babel >= 2.7.0 Requires: python3-imagesize >= 1.1.0 Requires: python3-jinja2 >= 2.10.3 Requires: python3-packaging >= 19.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 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 `_. %prep %setup -q -n %{srcname}-%{version} %build python3 setup.py build export PYTHONPATH=`pwd` cd doc make text cd ../ if [ "%{dotests}" == 1 ] then (PYTHONPATH=`pwd` python3 -m pytest || true) fi %install [ -d "$RPM_BUILD_ROOT" -a "$RPM_BUILD_ROOT" != "/" ] && rm -rf $RPM_BUILD_ROOT python3 setup.py install --skip-build --root ${RPM_BUILD_ROOT} #renaming the files in bindir to avoid conflict with python-sphinx cd ${RPM_BUILD_ROOT}/%{_bindir} for file in ${RPM_BUILD_ROOT}/%{_bindir}/*; do mv $file $file-3 done cd ${RPM_BUILD_ROOT} mkdir -p usr/bin cd usr/bin ln -sf ../..%{_bindir}/* . %clean [ "${RPM_BUILD_ROOT}" != "/" ] && rm -rf ${RPM_BUILD_ROOT} %files %defattr(-,root,system,-) %doc AUTHORS CHANGES EXAMPLES LICENSE README.rst %doc doc/_build/text %{_bindir}/* /usr/bin/* %{python_sitelib}/* %changelog * Tue Nov 05 2019 Baanu Tumma - 2.3.0-1 - First version for python3 * Tue Jul 16 2013 Tristan Delhalle - 1.1.3-1 - - first version for AIX V6.1 and higher