Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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