commit: 97bf9dbde04260bf1357232e3b11a124574c68a5 Author: Michał Górny <mgorny <AT> gentoo <DOT> org> AuthorDate: Sat Jan 27 11:48:56 2024 +0000 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> CommitDate: Sat Jan 27 12:10:34 2024 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=97bf9dbd
dev-python/breathe: Pull a sphinx-7.2 fix Closes: https://bugs.gentoo.org/922997 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org> ...athe-4.35.0.ebuild => breathe-4.35.0-r1.ebuild} | 5 +++ .../breathe/files/breathe-4.35.0-sphinx-7.2.patch | 40 ++++++++++++++++++++++ 2 files changed, 45 insertions(+) diff --git a/dev-python/breathe/breathe-4.35.0.ebuild b/dev-python/breathe/breathe-4.35.0-r1.ebuild similarity index 89% rename from dev-python/breathe/breathe-4.35.0.ebuild rename to 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?= <[email protected]> +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_
