SUMMARY="Python documentation generator" DESCRIPTION="Sphinx makes it easy to create intelligent and beautiful documentation. 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. Features: * Output formats: HTML, PDF, plain text, EPUB, TeX, manual pages, and more * 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 highlighting: automatic highlighting using the Pygments highlighter * Templating: Flexible HTML output using the Jinja 2 templating engine * Extension ecosystem: Many extensions are available, for example for automatic function \ documentation or working with Jupyter notebooks. * Language Support: Python, C, C++, JavaScript, mathematics, and many other languages through \ extensions." HOMEPAGE="https://www.sphinx-doc.org/" COPYRIGHT="2023 Georg Brandl" LICENSE="BSD (2-clause)" REVISION="1" SOURCE_URI="https://github.com/sphinx-doc/sphinx/archive/refs/tags/v$portVersion.tar.gz" CHECKSUM_SHA256="b41c04543148937b887097f396d7b2b54ae49d0597b68625f06ffdf702d4d917" ARCHITECTURES="any" PROVIDES=" $portName = $portVersion " REQUIRES=" haiku " BUILD_REQUIRES=" haiku_devel " PYTHON_PACKAGES=(python39 python310) PYTHON_VERSIONS=(3.9 3.10) defaultVersion=3.10 defaultTestVersion="python39" for i in "${!PYTHON_PACKAGES[@]}"; do pythonPackage=${PYTHON_PACKAGES[i]} pythonVersion=${PYTHON_VERSIONS[$i]} eval "PROVIDES_$pythonPackage=\" ${portName}_$pythonPackage = $portVersion cmd:sphinx_apidoc_$pythonVersion = $portVersion cmd:sphinx_autogen_$pythonVersion = $portVersion cmd:sphinx_build_$pythonVersion = $portVersion cmd:sphinx_quickstart_$pythonVersion = $portVersion \"" # Provide non-suffixed cmd only for the default Python version if [ $pythonVersion = $defaultVersion ]; then eval "PROVIDES_$pythonPackage+=\" cmd:sphinx_apidoc = $portVersion cmd:sphinx_autogen = $portVersion cmd:sphinx_build = $portVersion cmd:sphinx_quickstart = $portVersion \"" fi eval "REQUIRES_$pythonPackage=\" haiku alabaster_$pythonPackage babel_$pythonPackage docutils_$pythonPackage imagesize_$pythonPackage importlib_metadata_$pythonPackage # only for Python < 3.10 jinja_$pythonPackage packaging_$pythonPackage pygments_$pythonPackage requests_$pythonPackage sphinxcontrib_applehelp_$pythonPackage sphinxcontrib_devhelp_$pythonPackage sphinxcontrib_htmlhelp_$pythonPackage sphinxcontrib_jsmath_$pythonPackage sphinxcontrib_qthelp_$pythonPackage sphinxcontrib_serializinghtml_$pythonPackage cmd:python$pythonVersion \"" BUILD_REQUIRES+=" build_$pythonPackage flit_core_$pythonPackage installer_$pythonPackage " BUILD_PREREQUIRES+=" cmd:python$pythonVersion " done TEST_REQUIRES=" cython_$pythonPackage filelock_$defaultTestVersion html5lib_$defaultTestVersion sphinx_$defaultTestVersion snowballstemmer_$defaultTestVersion cmd:pytest " INSTALL() { for i in "${!PYTHON_PACKAGES[@]}"; do pythonVersion=${PYTHON_VERSIONS[$i]} python=python$pythonVersion $python -m build --wheel --skip-dependency-check --no-isolation $python -m installer -p $prefix dist/*.whl # Version suffix all the scripts for f in $binDir/*; do mv $f $f-$pythonVersion done # And provide suffix-less symlinks for the default version if [ $pythonVersion = $defaultVersion ]; then for f in $binDir/*; do ln -sr $f ${f%-$pythonVersion} done fi packageEntries ${PYTHON_PACKAGES[i]} \ $prefix/lib/python* \ $prefix/bin done } TEST() { pytest -v }