summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2024-01-27 12:48:56 +0100
committerMichał Górny <mgorny@gentoo.org>2024-01-27 13:10:34 +0100
commit97bf9dbde04260bf1357232e3b11a124574c68a5 (patch)
tree132360498849503a9dfb0249e8e4642a805774c8 /dev-python/breathe
parentdev-python/django-sortedm2m: Restrict to <dev-python/django-5 (diff)
downloadgentoo-97bf9dbde04260bf1357232e3b11a124574c68a5.tar.gz
gentoo-97bf9dbde04260bf1357232e3b11a124574c68a5.tar.bz2
gentoo-97bf9dbde04260bf1357232e3b11a124574c68a5.zip
dev-python/breathe: Pull a sphinx-7.2 fix
Closes: https://bugs.gentoo.org/922997 Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'dev-python/breathe')
-rw-r--r--dev-python/breathe/breathe-4.35.0-r1.ebuild (renamed from dev-python/breathe/breathe-4.35.0.ebuild)5
-rw-r--r--dev-python/breathe/files/breathe-4.35.0-sphinx-7.2.patch40
2 files changed, 45 insertions, 0 deletions
diff --git a/dev-python/breathe/breathe-4.35.0.ebuild b/dev-python/breathe/breathe-4.35.0-r1.ebuild
index 4c6e3cd4c57d..16719afdb406 100644
--- a/dev-python/breathe/breathe-4.35.0.ebuild
+++ b/dev-python/breathe/breathe-4.35.0-r1.ebuild
@@ -35,3 +35,8 @@ RDEPEND="
"
distutils_enable_tests pytest
+
+PATCHES=(
+ # https://github.com/breathe-doc/breathe/pull/956
+ "${FILESDIR}/${P}-sphinx-7.2.patch"
+)
diff --git a/dev-python/breathe/files/breathe-4.35.0-sphinx-7.2.patch b/dev-python/breathe/files/breathe-4.35.0-sphinx-7.2.patch
new file mode 100644
index 000000000000..b81eddc6a6e3
--- /dev/null
+++ b/dev-python/breathe/files/breathe-4.35.0-sphinx-7.2.patch
@@ -0,0 +1,40 @@
+From 46abd77157a2a57e81586e4f8765ae8f1a09d167 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Mark=C3=A9ta?= <meggy.calabkova@gmail.com>
+Date: Wed, 4 Oct 2023 15:53:59 +0200
+Subject: [PATCH] support Sphinx 7.2
+
+---
+ breathe/project.py | 2 +-
+ tests/test_renderer.py | 6 +++++-
+ 2 files changed, 6 insertions(+), 2 deletions(-)
+
+diff --git a/breathe/project.py b/breathe/project.py
+index 865236e8..9716cb59 100644
+--- a/breathe/project.py
++++ b/breathe/project.py
+@@ -113,7 +113,7 @@ def __init__(self, app: Sphinx):
+ # Assume general build directory is the doctree directory without the last component.
+ # We strip off any trailing slashes so that dirname correctly drops the last part.
+ # This can be overridden with the breathe_build_directory config variable
+- self._default_build_dir = os.path.dirname(app.doctreedir.rstrip(os.sep))
++ self._default_build_dir = app.doctreedir.parent
+ self.project_count = 0
+ self.project_info_store: Dict[str, ProjectInfo] = {}
+ self.project_info_for_auto_store: Dict[str, AutoProjectInfo] = {}
+diff --git a/tests/test_renderer.py b/tests/test_renderer.py
+index a858c65d..73a29e4e 100644
+--- a/tests/test_renderer.py
++++ b/tests/test_renderer.py
+@@ -35,7 +35,11 @@ def app(test_params, app_params, make_app, shared_result):
+ """
+ args, kwargs = app_params
+ assert "srcdir" in kwargs
+- kwargs["srcdir"].makedirs(exist_ok=True)
++ try:
++ kwargs["srcdir"].mkdir(parents=True, exist_ok=True)
++ except AttributeError:
++ # old version of Sphinx
++ kwargs["srcdir"].makedirs(exist_ok=True)
+ (kwargs["srcdir"] / "conf.py").write_text("")
+ app_ = make_app(*args, **kwargs)
+ yield app_