Mercurial > libervia-web
comparison doc/conf.py @ 1537:c2569408fa35
doc: fix version retrieval
author | Goffi <goffi@goffi.org> |
---|---|
date | Wed, 28 Jun 2023 10:05:15 +0200 |
parents | eb00d593801d |
children |
comparison
equal
deleted
inserted
replaced
1536:dc81403a5b2f | 1537:c2569408fa35 |
---|---|
13 # documentation root, use os.path.abspath to make it absolute, like shown here. | 13 # documentation root, use os.path.abspath to make it absolute, like shown here. |
14 # | 14 # |
15 # import os | 15 # import os |
16 # import sys | 16 # import sys |
17 # sys.path.insert(0, os.path.abspath('.')) | 17 # sys.path.insert(0, os.path.abspath('.')) |
18 import os.path | 18 from libervia.web import __version__ |
19 import re | |
20 | 19 |
21 | 20 |
22 # -- Project information ----------------------------------------------------- | 21 # -- Project information ----------------------------------------------------- |
23 | 22 |
24 project = u'Libervia Web' | 23 project = u'Libervia Web' |
25 copyright = u'2019-2023 Jérôme Poisson' | 24 copyright = u'2019-2023 Jérôme Poisson' |
26 author = u'Jérôme Poisson' | 25 author = u'Jérôme Poisson' |
27 | 26 |
28 doc_dir = os.path.dirname(os.path.abspath(__file__)) | 27 version = __version__ |
29 version_path = os.path.join(doc_dir, '../libervia/web/VERSION') | |
30 with open(version_path) as f: | |
31 version_full = f.read() | |
32 | |
33 # The short X.Y version | |
34 version = re.match(r'[0-9.]+', version_full).group() | |
35 | |
36 # The full version, including alpha/beta/rc tags | |
37 release = version_full | |
38 | 28 |
39 | 29 |
40 # -- General configuration --------------------------------------------------- | 30 # -- General configuration --------------------------------------------------- |
41 | 31 |
42 # If your documentation needs a minimal Sphinx version, state it here. | 32 # If your documentation needs a minimal Sphinx version, state it here. |