[packages/python3-pydata_sphinx_theme] - updated to 0.16.1

qboosh qboosh at pld-linux.org
Fri Nov 7 20:59:51 CET 2025


commit 7d4bfdbbad9388d1ec0b64dbbbf525960b839ec3
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Fri Nov 7 20:59:52 2025 +0100

    - updated to 0.16.1

 pydata_sphinx_theme-deprecated.patch | 46 -----------------------------
 python3-pydata_sphinx_theme.spec     | 57 ++++++++++++++++++++++++------------
 2 files changed, 39 insertions(+), 64 deletions(-)
---
diff --git a/python3-pydata_sphinx_theme.spec b/python3-pydata_sphinx_theme.spec
index 4a7ed8a..2691b01 100644
--- a/python3-pydata_sphinx_theme.spec
+++ b/python3-pydata_sphinx_theme.spec
@@ -1,37 +1,51 @@
 #
 # Conditional build:
+%bcond_with	doc	# Sphinx documentation (TODO: many missing deps)
 %bcond_without	tests	# unit tests
 
 Summary:	Bootstrap-based Sphinx theme from the PyData community
 Summary(pl.UTF-8):	Motyw Sphinksa oparty na motywie Bootstrap, stworzony przez społeczność PyData
 Name:		python3-pydata_sphinx_theme
-# versions >= 0.8 require sphinx-theme-builder, which is not ready in PLD
-Version:	0.7.2
-Release:	4
+Version:	0.16.1
+Release:	1
 License:	BSD
 Group:		Libraries/Python
 #Source0Download: https://pypi.org/simple/pydata-sphinx-theme/
-Source0:	https://files.pythonhosted.org/packages/source/p/pydata-sphinx-theme/pydata-sphinx-theme-%{version}.tar.gz
-# Source0-md5:	d13330b18df272bd9f46f42b033f1524
-Patch0:		pydata_sphinx_theme-deprecated.patch
+Source0:	https://files.pythonhosted.org/packages/source/p/pydata-sphinx-theme/pydata_sphinx_theme-%{version}.tar.gz
+# Source0-md5:	e629ab8013637be343c9f1836863c232
+Source1:	pydata_sphinx_theme-0.16.1-vendor.tar.xz
+# Source1-md5:	da543d22d8fbf6947b563a74b2eecd01
 URL:		https://pypi.org/project/pydata-sphinx-theme/
-BuildRequires:	python3-modules >= 1:3.5
-BuildRequires:	python3-setuptools
+BuildRequires:	gettext-tools
+BuildRequires:	nodejs
+BuildRequires:	npm
+BuildRequires:	python3-build
+BuildRequires:	python3-installer
+BuildRequires:	python3-modules >= 1:3.9
+BuildRequires:	python3-nodeenv
+BuildRequires:	python3-sphinx_theme_builder
 %if %{with tests}
-BuildRequires:	python3-Sphinx
+BuildRequires:	python3-Sphinx >= 6.1
+BuildRequires:	python3-accessible-pygments
+BuildRequires:	python3-babel
 BuildRequires:	python3-bs4
 BuildRequires:	python3-docutils >= 0.17.1
-BuildRequires:	python3-packaging
+BuildRequires:	python3-pygments >= 2.7
 BuildRequires:	python3-pytest
+BuildRequires:	python3-pytest-datadir
 BuildRequires:	python3-pytest-regressions
 BuildRequires:	python3-sphinx_testing
+BuildRequires:	python3-typing_extensions
 %endif
 BuildRequires:	rpm-pythonprov
-BuildRequires:	rpmbuild(macros) >= 1.714
-Requires:	python3-modules >= 1:3.5
+BuildRequires:	rpmbuild(macros) >= 2.044
+BuildRequires:	sed >= 4.0
+Requires:	python3-modules >= 1:3.9
 BuildArch:	noarch
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
+%define	nodejs_version	%(nodejs -v | sed s/v//)
+
 %description
 A Bootstrap-based Sphinx theme from the PyData community.
 
@@ -40,22 +54,29 @@ Motyw Sphinksa oparty na motywie Bootstrap, stworzony przez
 społeczność PyData.
 
 %prep
-%setup -q -n pydata-sphinx-theme-%{version}
-%patch -P 0 -p1
+%setup -q -n pydata_sphinx_theme-%{version} -a1
+
+# Substitute the installed nodejs version for the requested version
+sed -i 's,^\(node-version = \)".*",\1"%{nodejs_version}",' pyproject.toml
 
 %build
-%py3_build
+%{__python3} -m nodeenv --node=system --prebuilt --clean-src $(pwd)/.nodeenv
+
+%py3_build_pyproject
 
 %if %{with tests}
+# two test_pygments_fallbacks cases fail (as of 0.16.1), don't know why
+%{__python3} -m zipfile -e build-3/*.whl build-3-test
 PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 \
 PYTEST_PLUGINS="pytest_datadir.plugin,pytest_regressions.plugin,sphinx.testing.fixtures" \
-%{__python3} -m pytest tests
+PYTHONPATH=$(pwd)/build-3-test \
+%{__python3} -m pytest tests -m 'not a11y' -k 'not test_pygments_fallbacks'
 %endif
 
 %install
 rm -rf $RPM_BUILD_ROOT
 
-%py3_install
+%py3_install_pyproject
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -64,4 +85,4 @@ rm -rf $RPM_BUILD_ROOT
 %defattr(644,root,root,755)
 %doc LICENSE README.md
 %{py3_sitescriptdir}/pydata_sphinx_theme
-%{py3_sitescriptdir}/pydata_sphinx_theme-%{version}-py*.egg-info
+%{py3_sitescriptdir}/pydata_sphinx_theme-%{version}.dist-info
diff --git a/pydata_sphinx_theme-deprecated.patch b/pydata_sphinx_theme-deprecated.patch
deleted file mode 100644
index 52bfb43..0000000
--- a/pydata_sphinx_theme-deprecated.patch
+++ /dev/null
@@ -1,46 +0,0 @@
---- pydata-sphinx-theme-0.7.2/pydata_sphinx_theme/__init__.py.orig	2021-11-10 20:51:21.000000000 +0100
-+++ pydata-sphinx-theme-0.7.2/pydata_sphinx_theme/__init__.py	2023-01-07 19:29:13.725241701 +0100
-@@ -367,7 +367,7 @@ def _get_local_toctree_for(
-         kwargs["maxdepth"] = int(kwargs["maxdepth"])
-     kwargs["collapse"] = collapse
- 
--    for toctreenode in doctree.traverse(addnodes.toctree):
-+    for toctreenode in doctree.findall(addnodes.toctree):
-         toctree = self.resolve(docname, builder, toctreenode, prune=True, **kwargs)
-         if toctree:
-             toctrees.append(toctree)
---- pydata-sphinx-theme-0.7.2/pydata_sphinx_theme/bootstrap_html_translator.py.orig	2021-11-10 20:51:21.000000000 +0100
-+++ pydata-sphinx-theme-0.7.2/pydata_sphinx_theme/bootstrap_html_translator.py	2023-01-07 19:29:42.538418940 +0100
-@@ -1,7 +1,7 @@
- """A custom Sphinx HTML Translator for Bootstrap layout
- """
--from distutils.version import LooseVersion
- from docutils import nodes
-+from packaging.version import Version
- 
- import sphinx
- from sphinx.writers.html5 import HTML5Translator
-@@ -34,10 +34,10 @@ class BootstrapHTML5Translator(HTML5Tran
-         # but add 'table' class
- 
-         # generate_targets_for_table is deprecated in 4.0
--        if LooseVersion(sphinx.__version__) < LooseVersion("4.0"):
-+        if Version(sphinx.__version__) < Version("4.0"):
-             self.generate_targets_for_table(node)
- 
--        if LooseVersion(sphinx.__version__) < LooseVersion("4.3"):
-+        if Version(sphinx.__version__) < Version("4.3"):
-             self._table_row_index = 0
-         else:
-             self._table_row_indices.append(0)
---- pydata-sphinx-theme-0.7.2/setup.py.orig	2021-11-10 20:51:21.000000000 +0100
-+++ pydata-sphinx-theme-0.7.2/setup.py	2023-01-07 19:32:33.520825982 +0100
-@@ -48,7 +48,7 @@ setup(
-     include_package_data=True,
-     # See http://www.sphinx-doc.org/en/stable/theming.html#distribute-your-theme-as-a-python-package
-     entry_points={"sphinx.html_themes": ["pydata_sphinx_theme = pydata_sphinx_theme"]},
--    install_requires=["sphinx", "beautifulsoup4", "docutils!=0.17.0"],
-+    install_requires=["sphinx", "beautifulsoup4", "docutils!=0.17.0", "packaging"],
-     extras_require={
-         "test": tests_require,
-         "coverage": ["pytest-cov", "codecov", *tests_require],
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/python3-pydata_sphinx_theme.git/commitdiff/7d4bfdbbad9388d1ec0b64dbbbf525960b839ec3



More information about the pld-cvs-commit mailing list