Skip to content

Commit 286c770

Browse files
committed
docs/conf.py: simplify code updating sys.path
1 parent fdc9199 commit 286c770

File tree

1 file changed

+4
-13
lines changed

1 file changed

+4
-13
lines changed

docs/conf.py

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -13,22 +13,13 @@
1313
# All configuration values have a default; values that are commented out
1414
# serve to show the default.
1515

16-
import os
17-
import sys
18-
1916
# If extensions (or modules to document with autodoc) are in another directory,
2017
# add these directories to sys.path here. If the directory is relative to the
2118
# documentation root, use os.path.abspath to make it absolute, like shown here.
22-
sys.path.insert(0, os.path.abspath('.'))
23-
24-
# Get the project root dir, which is the parent dir of this
25-
cwd = os.getcwd()
26-
project_root = os.path.dirname(cwd)
27-
28-
# Insert the project root dir as the first element in the PYTHONPATH.
29-
# This lets us ensure that the source package is imported, and that its
30-
# version is used.
31-
sys.path.insert(0, project_root)
19+
#
20+
import os
21+
import sys
22+
sys.path.insert(0, os.path.abspath('..'))
3223

3324
import cmake
3425

0 commit comments

Comments
 (0)