diff --git a/.readthedocs.yaml b/.readthedocs.yaml index bcec7a7..63787ce 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -12,11 +12,6 @@ sphinx: conda: environment: environment.yml -# Install doc-building dependencies -python: - install: - - requirements: docs/requirements.txt - # Specify the build process build: os: ubuntu-24.04 @@ -25,4 +20,9 @@ build: jobs: install: - bash ./linux_build.bash - - pip install libcarna_python-*.whl \ No newline at end of file + - pip install dist/libcarna_python-*.whl + pre_build: + - pip install -r docs/requirements.txt + build: + html: + - LIBCARNA_PYTHON_NBSPHINX_EXECUTE=never sphinx-build -M html docs $READTHEDOCS_OUTPUT \ No newline at end of file diff --git a/docs/conf.py b/docs/conf.py index 056a7ec..c6824e2 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -17,7 +17,8 @@ import sys LIBCARNA_PYTHON_PATH = os.environ.get('LIBCARNA_PYTHON_PATH') -sys.path.append(LIBCARNA_PYTHON_PATH) -os.environ['PYTHONPATH'] = LIBCARNA_PYTHON_PATH + ':' + os.environ.get('PYTHONPATH', '') +if LIBCARNA_PYTHON_PATH is not None: + sys.path.append(LIBCARNA_PYTHON_PATH) + os.environ['PYTHONPATH'] = LIBCARNA_PYTHON_PATH + ':' + os.environ.get('PYTHONPATH', '') -nbsphinx_execute = 'always' \ No newline at end of file +nbsphinx_execute = os.environ.get('LIBCARNA_PYTHON_NBSPHINX_EXECUTE', 'always') \ No newline at end of file