Skip to content

Commit

Permalink
try to get sphinx pkg version with pkg_resources
Browse files Browse the repository at this point in the history
  • Loading branch information
Jasper van den Bosch committed Nov 6, 2022
1 parent 3dda8b8 commit c4da990
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion docs/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,3 @@ sphinx
nbsphinx
nbsphinx-link
ipykernel
importlib_metadata;python_version<'3.8'
4 changes: 2 additions & 2 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#
import os
import sys
from importlib.metadata import version as identify_version
from pkg_resources import get_distribution
sys.path.insert(0, os.path.abspath('.'))
sys.path.insert(0, os.path.abspath('../'))

Expand All @@ -25,7 +25,7 @@
author = 'rsatoolbox authors'

# The full version
release = identify_version('myproject')
release = get_distribution('rsatoolbox').version

# The short X.Y version
version = '.'.join(release.split('.')[:2])
Expand Down

0 comments on commit c4da990

Please sign in to comment.