Skip to content

Commit c4da990

Browse files
author
Jasper van den Bosch
committed
try to get sphinx pkg version with pkg_resources
1 parent 3dda8b8 commit c4da990

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

docs/requirements.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,3 @@ sphinx
22
nbsphinx
33
nbsphinx-link
44
ipykernel
5-
importlib_metadata;python_version<'3.8'

docs/source/conf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
#
1515
import os
1616
import sys
17-
from importlib.metadata import version as identify_version
17+
from pkg_resources import get_distribution
1818
sys.path.insert(0, os.path.abspath('.'))
1919
sys.path.insert(0, os.path.abspath('../'))
2020

@@ -25,7 +25,7 @@
2525
author = 'rsatoolbox authors'
2626

2727
# The full version
28-
release = identify_version('myproject')
28+
release = get_distribution('rsatoolbox').version
2929

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

0 commit comments

Comments
 (0)