We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 83e759c + 17450be commit 5c7b0f8Copy full SHA for 5c7b0f8
docs/conf.py
@@ -46,9 +46,11 @@ def __getattr__(cls, name):
46
copyright = '2018-2019, Tskit developers'
47
author = 'Tskit developers'
48
49
-# Following https://github.com/pypa/setuptools_scm#usage-from-sphinx
50
-from pkg_resources import get_distribution
51
-release = get_distribution(project).version
+
+with open(os.path.abspath('../python/tskit/_version.py')) as f:
+ exec(f.read())
52
+# tskit_version is defined in the specified file.
53
+release = tskit_version
54
version = '.'.join(release.split('.')[:2])
55
56
###################################################################
0 commit comments