|
@@ -64,14 +64,19 @@ author = 'Project Jupyter'
|
|
|
# The version info for the project you're documenting, acts as replacement for
|
|
|
# |version| and |release|, also used in various other places throughout the
|
|
|
# built documents.
|
|
|
-#
|
|
|
-# The short X.Y version.
|
|
|
-import json
|
|
|
-with open('../../dev_mode/package.json', 'r') as f:
|
|
|
- version = json.load(f)['version']
|
|
|
|
|
|
+import os
|
|
|
+_version_py = os.path.join('..', '..', 'jupyterlab', '_version.py')
|
|
|
+version_ns = {}
|
|
|
+
|
|
|
+with open(_version_py, mode='r') as version_file:
|
|
|
+ exec(version_file.read(), version_ns)
|
|
|
+
|
|
|
+# The short X.Y version.
|
|
|
+version = '%i.%i' % version_ns['version_info'][:2]
|
|
|
# The full version, including alpha/beta/rc tags.
|
|
|
-release = version
|
|
|
+release = version_ns['__version__']
|
|
|
+
|
|
|
|
|
|
# The language for content autogenerated by Sphinx. Refer to documentation
|
|
|
# for a list of supported languages.
|