Skip to content

Commit

Permalink
Use autogenerated _version.py file for readthedocs
Browse files Browse the repository at this point in the history
  • Loading branch information
flferretti committed Jan 24, 2024
1 parent 50b2b3d commit 0957a67
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ build:
conda:
environment: docs/jaxsim_conda_env.yml

python:
install:
- method: pip
path: .

sphinx:
configuration: docs/conf.py

Expand Down
5 changes: 2 additions & 3 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import os
import pathlib
import sys
from pkg_resources import get_distribution

# -- Version information

Expand All @@ -11,10 +12,8 @@

module_path = os.path.abspath("../src/")
sys.path.insert(0, module_path)
version_file = os.path.abspath("../src/jaxsim/version.txt")

with open(version_file) as file_handler:
__version__ = file_handler.read().strip()
__version__ = get_distribution("jaxsim").version

# -- Project information

Expand Down

0 comments on commit 0957a67

Please sign in to comment.