Mercurial > libervia-web
comparison doc/conf.py @ 1440:939b5c643f3d
doc: use VERSION file to get version in the same way as for backend
author | Goffi <goffi@goffi.org> |
---|---|
date | Fri, 18 Jun 2021 15:31:29 +0200 |
parents | 822bd0139769 |
children | e1ccba0d2b71 |
comparison
equal
deleted
inserted
replaced
1439:ac2374c92294 | 1440:939b5c643f3d |
---|---|
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 | |
19 import re | |
18 | 20 |
19 | 21 |
20 # -- Project information ----------------------------------------------------- | 22 # -- Project information ----------------------------------------------------- |
21 | 23 |
22 project = u'Libervia (Salut à Toi)' | 24 project = u'Libervia (Salut à Toi)' |
23 copyright = u'2019-2021 Jérôme Poisson' | 25 copyright = u'2019-2021 Jérôme Poisson' |
24 author = u'Jérôme Poisson' | 26 author = u'Jérôme Poisson' |
25 | 27 |
28 doc_dir = os.path.dirname(os.path.abspath(__file__)) | |
29 version_path = os.path.join(doc_dir, '../libervia/VERSION') | |
30 with open(version_path) as f: | |
31 version_full = f.read() | |
32 | |
26 # The short X.Y version | 33 # The short X.Y version |
27 version = u'' | 34 version = re.match(r'[0-9.]+', version_full).group() |
35 | |
28 # The full version, including alpha/beta/rc tags | 36 # The full version, including alpha/beta/rc tags |
29 release = u'0.7' | 37 release = version_full |
30 | 38 |
31 | 39 |
32 # -- General configuration --------------------------------------------------- | 40 # -- General configuration --------------------------------------------------- |
33 | 41 |
34 # If your documentation needs a minimal Sphinx version, state it here. | 42 # If your documentation needs a minimal Sphinx version, state it here. |