8000
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.
1 parent cdba722 commit 5e24645Copy full SHA for 5e24645
docs/source/conf.py
@@ -22,14 +22,14 @@
22
project = 'Spatial Maths package'
23
copyright = '2020-, Peter Corke.'
24
author = 'Peter Corke'
25
-import spatialmath
26
-version = spatialmath.__version__
27
-
28
-# The full version, including alpha/beta/rc tags
29
-# with open('../../RELEASE', encoding='utf-8') as f:
30
-# release = f.read()
31
-# import spatialmath
32
-# release = spatialmath.__version__
+try:
+ import spatialmath
+ version = spatialmath.__version__
+except AttributeError:
+ import re
+ with open("../../pyproject.toml", "r") as f:
+ m = re.compile(r'version\s*=\s*"([0-9\.]+)"').search(f.read())
+ version = m[1]
33
34
# -- General configuration ---------------------------------------------------
35
0 commit comments