Mercurial > p > roundup > code
comparison website/www/conf.py @ 7468:f100f5fdf6bf
Autmatically get version and release from roundup/__init__.py
Copy code from docs/conf.py that generates the release and version
settings from roundup/__init__.py into website/www/conf.py.
Update RELEASE.txt to remove need to set these manually and annotate a
couple of other documented changes.
| author | John Rouillard <rouilj@ieee.org> |
|---|---|
| date | Thu, 08 Jun 2023 01:02:32 -0400 |
| parents | 51fc06fabcee |
| children | 452a8bd1d826 |
comparison
equal
deleted
inserted
replaced
| 7467:92fb16035d92 | 7468:f100f5fdf6bf |
|---|---|
| 17 # All configuration values have a default; values that are commented out | 17 # All configuration values have a default; values that are commented out |
| 18 # serve to show the default. | 18 # serve to show the default. |
| 19 | 19 |
| 20 import sys, os | 20 import sys, os |
| 21 | 21 |
| 22 # Read Roundup version by importing it from root of checkout. | |
| 23 # this ensures that 'unknown version' is inserted even if | |
| 24 # `roundup` is importable from other location in sys.path | |
| 25 SYSSAVE = sys.path | |
| 26 DOCROOT = os.path.abspath(os.path.dirname(__file__) + "/..") | |
| 27 sys.path = [os.path.dirname(DOCROOT)] | |
| 28 try: | |
| 29 from roundup import __version__ as VERSION | |
| 30 SHORTVER = '.'.join(VERSION.split('.', 2)[:2]) | |
| 31 except ImportError: | |
| 32 VERSION = SHORTVER = '(unknown version)' | |
| 33 finally: | |
| 34 sys.path = SYSSAVE | |
| 35 | |
| 22 # If your extensions are in another directory, add it here. If the directory | 36 # If your extensions are in another directory, add it here. If the directory |
| 23 # is relative to the documentation root, use os.path.abspath to make it | 37 # is relative to the documentation root, use os.path.abspath to make it |
| 24 # absolute, like shown here. | 38 # absolute, like shown here. |
| 25 #sys.path.append(os.path.abspath('.')) | 39 #sys.path.append(os.path.abspath('.')) |
| 26 | 40 |
| 53 # The version info for the project you're documenting, acts as replacement for | 67 # The version info for the project you're documenting, acts as replacement for |
| 54 # |version| and |release|, also used in various other places throughout the | 68 # |version| and |release|, also used in various other places throughout the |
| 55 # built documents. | 69 # built documents. |
| 56 # | 70 # |
| 57 # The short X.Y version. | 71 # The short X.Y version. |
| 58 version = '2.3b2' | 72 version = SHORTVER |
| 59 # The full version, including alpha/beta/rc tags. | 73 # The full version, including alpha/beta/rc tags. |
| 60 release = '2.3.0b2' | 74 release = VERSION |
| 61 | 75 |
| 62 # The language for content autogenerated by Sphinx. Refer to documentation | 76 # The language for content autogenerated by Sphinx. Refer to documentation |
| 63 # for a list of supported languages. | 77 # for a list of supported languages. |
| 64 #language = None | 78 #language = None |
| 65 | 79 |
