Skip to content

Commit 5b571c6

Browse files
committed
Define srcdir as a Path
This doesn't break anything, and seems to be required at least in Sphinx 8.1.3, most probably some earlier versions too (we're in 7.2.6). Signed-off-by: Rodrigo Tobar <rtobar@icrar.org>
1 parent 6191d45 commit 5b571c6

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

conf.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616
import sys
1717
import os
1818
import time
19+
from pathlib import Path
20+
1921
sys.path.append(os.path.abspath('cpython/Doc/tools/extensions'))
2022
sys.path.append(os.path.abspath('cpython/Doc/includes'))
2123

@@ -70,7 +72,6 @@
7072

7173
if os.environ.get('SPHINX_GETTEXT') is None:
7274
# Override all the files from ``.overrides`` directory
73-
from pathlib import Path
7475
overrides_paths = Path('.overrides')
7576

7677
for path in overrides_paths.glob('**/*.*'):
@@ -129,7 +130,7 @@ def add_contributing_banner(app, doctree):
129130
document.insert(0, banner)
130131

131132
# Change the sourcedir programmatically because Read the Docs always call it with `.`
132-
app.srcdir = os.getcwd() + '/cpython/Doc'
133+
app.srcdir = Path(os.getcwd() + '/cpython/Doc')
133134

134135
app.connect('doctree-read', add_contributing_banner)
135136

0 commit comments

Comments
 (0)