Skip to content

Commit

Permalink
Fix some readthedocs issues.
Browse files Browse the repository at this point in the history
  • Loading branch information
cr1901 committed Nov 26, 2024
1 parent 8185d3f commit 57b23d8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
3 changes: 3 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ build:
# rust: "1.70"
# golang: "1.20"
jobs:
post_checkout:
# Reconstruct tags.
- git fetch --unshallow --tags
post_create_environment:
# Install PDM
- pip install -U pdm
Expand Down
7 changes: 6 additions & 1 deletion doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,12 @@
release = sent_ver.public
author = 'William D. Jones'

sys.path.append(os.path.abspath('../src'))
# Won't be picked up otherwise b/c RTD bypasses PDM and uses a different
# working directory?
on_rtd = os.environ.get("READTHEDOCS") == "True"
if on_rtd:
sys.path.append(os.path.abspath('../src'))
sys.path.append(os.path.abspath('..'))

# -- General configuration ---------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
Expand Down

0 comments on commit 57b23d8

Please sign in to comment.