[packages/python-sphinxcontrib-katex] - initial, not for builders
qboosh
qboosh at pld-linux.org
Sun Dec 28 19:26:55 CET 2025
commit e2d15662ebad7392b78c244649aed3177008d972
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Sun Dec 28 19:27:18 2025 +0100
- initial, not for builders
python-sphinxcontrib-katex.spec | 135 ++++++++++++++++++++++++++++++++++++++++
1 file changed, 135 insertions(+)
---
diff --git a/python-sphinxcontrib-katex.spec b/python-sphinxcontrib-katex.spec
new file mode 100644
index 0000000..09a6328
--- /dev/null
+++ b/python-sphinxcontrib-katex.spec
@@ -0,0 +1,135 @@
+#
+# Conditional build:
+%bcond_without doc # Sphinx documentation
+%bcond_without python2 # CPython 2.x module
+%bcond_with python3 # CPython 3.x module (built from python3-sphinxcontrib-katex.spec; here only sphinx<4 is supported)
+
+Summary: Sphinx extension for rendering math in HTML pages
+Summary(pl.UTF-8): Rozszerzenie Sphinksa do renderowania wzorów matematycznych na stronach HTML
+Name: python-sphinxcontrib-katex
+# keep 0.7.x here for python2 support
+Version: 0.7.2
+Release: 0.1
+License: MIT
+Group: Libraries/Python
+#Source0Download: https://pypi.org/simple/sphinxcontrib-katex/
+Source0: https://files.pythonhosted.org/packages/source/s/sphinxcontrib-katex/sphinxcontrib-katex-%{version}.tar.gz
+# Source0-md5: 03b1c5e42af90ad3aeedb9028812a25a
+URL: https://pypi.org/project/sphinxcontrib-katex/
+%if %{with python2}
+BuildRequires: python-modules >= 1:2.7
+BuildRequires: python-setuptools
+%endif
+%if %{with python3}
+BuildRequires: python3-modules >= 1:3.4
+BuildRequires: python3-setuptools
+%endif
+BuildRequires: rpm-pythonprov
+BuildRequires: rpmbuild(macros) >= 1.714
+%if %{with doc}
+BuildRequires: sphinx-pdg-2 >= 1.8
+%endif
+Requires: python-modules >= 1:2.7
+Requires: python-sphinxcontrib
+BuildArch: noarch
+BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+The extension uses KaTeX for rendering of math in HTML pages. It is
+designed as a replacement for the built-in extension
+sphinx.ext.mathjax, which uses MathJax for rendering.
+
+%description -l pl.UTF-8
+To rozszerzenie wykorzystuje KaTeX do renderowania wzorów
+matematycznych na stronach HTML. Zostało zaprojektowane jako zamiennik
+wbudowanego rozszerzenia sphinx.ext.mathjax, które wykorzystuje do
+renderowania biblioteki MathJax.
+
+%package -n python3-sphinxcontrib-katex
+Summary: Sphinx extension for rendering math in HTML pages
+Summary(pl.UTF-8): Rozszerzenie Sphinksa do renderowania wzorów matematycznych na stronach HTML
+Group: Libraries/Python
+Requires: python3-modules >= 1:3.4
+Requires: python3-sphinxcontrib
+
+%description -n python3-sphinxcontrib-katex
+The extension uses KaTeX for rendering of math in HTML pages. It is
+designed as a replacement for the built-in extension
+sphinx.ext.mathjax, which uses MathJax for rendering.
+
+%description -n python3-sphinxcontrib-katex -l pl.UTF-8
+To rozszerzenie wykorzystuje KaTeX do renderowania wzorów
+matematycznych na stronach HTML. Zostało zaprojektowane jako zamiennik
+wbudowanego rozszerzenia sphinx.ext.mathjax, które wykorzystuje do
+renderowania biblioteki MathJax.
+
+%package apidocs
+Summary: API documentation for Python sphinxcontrib-katex module
+Summary(pl.UTF-8): Dokumentacja API modułu Pythona sphinxcontrib-katex
+Group: Documentation
+
+%description apidocs
+API documentation for Python sphinxcontrib-katex module.
+
+%description apidocs -l pl.UTF-8
+Dokumentacja API modułu Pythona sphinxcontrib-katex.
+
+%prep
+%setup -q -n sphinxcontrib-katex-%{version}
+
+%build
+%if %{with python2}
+%py_build
+%endif
+
+%if %{with python3}
+%py3_build
+%endif
+
+%if %{with doc}
+PYTHONPATH=$(pwd) \
+sphinx-build-2 -b html docs docs/_build/html
+%endif
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+%if %{with python2}
+%py_install
+
+%py_postclean
+%endif
+
+%if %{with python3}
+%py3_install
+%endif
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%if %{with python2}
+%files
+%defattr(644,root,root,755)
+%doc LICENSE NEWS.rst README.rst
+%{py_sitescriptdir}/sphinxcontrib/katex.py[co]
+%{py_sitescriptdir}/sphinxcontrib/katex-math.css
+%{py_sitescriptdir}/sphinxcontrib_katex-%{version}-py*.egg-info
+%{py_sitescriptdir}/sphinxcontrib_katex-%{version}-py*-nspkg.pth
+%endif
+
+%if %{with python3}
+%files -n python3-sphinxcontrib-katex
+%defattr(644,root,root,755)
+%doc LICENSE NEWS.rst README.rst
+%{py3_sitescriptdir}/sphinxcontrib/katex.py
+%{py3_sitescriptdir}/sphinxcontrib/katex-math.css
+%{py3_sitescriptdir}/sphinxcontrib/__pycache__/katex.cpython-*.py[co]
+%{py3_sitescriptdir}/sphinxcontrib_katex-%{version}-py*.egg-info
+%{py3_sitescriptdir}/sphinxcontrib_katex-%{version}-py*-nspkg.pth
+%endif
+
+%if %{with doc}
+%files apidocs
+%defattr(644,root,root,755)
+%doc docs/_build/html/{_static,*.html,*.js}
+%endif
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/python-sphinxcontrib-katex.git/commitdiff/e2d15662ebad7392b78c244649aed3177008d972
More information about the pld-cvs-commit
mailing list