diff --git a/build-docs.sh b/build-docs.sh index 3eb4b749a..2838e6419 100644 --- a/build-docs.sh +++ b/build-docs.sh @@ -1,4 +1,4 @@ -export PYTHONPATH="$PYTHONPATH:$(pwd)/src" +export PYTHONPATH="$(python build_scripts/pythonpath.py)" rm -rf docs/build rm -rf docs/jupyter_execute jupyter-book config sphinx docs/ diff --git a/build_scripts/pythonpath.py b/build_scripts/pythonpath.py new file mode 100644 index 000000000..3b1dd1246 --- /dev/null +++ b/build_scripts/pythonpath.py @@ -0,0 +1,5 @@ +import os + +SCRIPT_DIR = os.path.dirname(os.path.realpath(__file__)) + +print(os.environ["PYTHONPATH"] + os.pathsep + os.path.abspath(os.path.join(SCRIPT_DIR, "..", "src")))