From 65c9f4da1920abb0cdbde352cd85234c6c1307ca Mon Sep 17 00:00:00 2001 From: Chris Sewell Date: Tue, 7 Jan 2025 09:27:34 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Fix:=20make=20external=20paths?= =?UTF-8?q?=20relative=20to=20`confdir`,=20not=20`srcdir`=20(#1378)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Paths set in the `conf.py` should be relative to it, not to the `srcdir`. Note, often `confdir` and `srcdir` are equivalent, but this is not always the case. --- sphinx_needs/external_needs.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sphinx_needs/external_needs.py b/sphinx_needs/external_needs.py index 08b131e9a..db22f2861 100644 --- a/sphinx_needs/external_needs.py +++ b/sphinx_needs/external_needs.py @@ -77,7 +77,7 @@ def load_external_needs( if os.path.isabs(source["json_path"]): json_path = source["json_path"] else: - json_path = os.path.join(app.srcdir, source["json_path"]) + json_path = os.path.join(app.confdir, source["json_path"]) if not os.path.exists(json_path): raise NeedsExternalException(