Skip to content

Commit

Permalink
Merge pull request #161 from jeromekelleher/fix-docs
Browse files Browse the repository at this point in the history
Fix version number problem on RTD.
  • Loading branch information
jeromekelleher authored Mar 27, 2019
2 parents 83e759c + 17450be commit 5c7b0f8
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,11 @@ def __getattr__(cls, name):
copyright = '2018-2019, Tskit developers'
author = 'Tskit developers'

# Following https://github.com/pypa/setuptools_scm#usage-from-sphinx
from pkg_resources import get_distribution
release = get_distribution(project).version

with open(os.path.abspath('../python/tskit/_version.py')) as f:
exec(f.read())
# tskit_version is defined in the specified file.
release = tskit_version
version = '.'.join(release.split('.')[:2])

###################################################################
Expand Down

0 comments on commit 5c7b0f8

Please sign in to comment.