Skip to content

Commit 5c7b0f8

Browse files
Merge pull request #161 from jeromekelleher/fix-docs
Fix version number problem on RTD.
2 parents 83e759c + 17450be commit 5c7b0f8

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

docs/conf.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,11 @@ def __getattr__(cls, name):
4646
copyright = '2018-2019, Tskit developers'
4747
author = 'Tskit developers'
4848

49-
# Following https://github.com/pypa/setuptools_scm#usage-from-sphinx
50-
from pkg_resources import get_distribution
51-
release = get_distribution(project).version
49+
50+
with open(os.path.abspath('../python/tskit/_version.py')) as f:
51+
exec(f.read())
52+
# tskit_version is defined in the specified file.
53+
release = tskit_version
5254
version = '.'.join(release.split('.')[:2])
5355

5456
###################################################################

0 commit comments

Comments
 (0)