Mercurial > hgrepos > FreeBSD > ports > sysutils > local-bsdtools
comparison docs/conf.py @ 291:f2b4edf5f6a3
Docs: read the version from the Makefile
| author | Franz Glasner <fzglas.hg@dom66.de> |
|---|---|
| date | Sun, 18 Sep 2022 12:04:00 +0200 |
| parents | 994172263c6e |
| children | 73ac6bec36fe |
comparison
equal
deleted
inserted
replaced
| 290:7508d9a9cf49 | 291:f2b4edf5f6a3 |
|---|---|
| 8 | 8 |
| 9 # If extensions (or modules to document with autodoc) are in another directory, | 9 # If extensions (or modules to document with autodoc) are in another directory, |
| 10 # add these directories to sys.path here. If the directory is relative to the | 10 # add these directories to sys.path here. If the directory is relative to the |
| 11 # documentation root, use os.path.abspath to make it absolute, like shown here. | 11 # documentation root, use os.path.abspath to make it absolute, like shown here. |
| 12 # | 12 # |
| 13 # import os | 13 import os |
| 14 import re | |
| 14 # import sys | 15 # import sys |
| 15 # sys.path.insert(0, os.path.abspath('.')) | 16 # sys.path.insert(0, os.path.abspath('.')) |
| 16 | 17 |
| 17 | 18 |
| 18 # -- Project information ----------------------------------------------------- | 19 # -- Project information ----------------------------------------------------- |
| 20 project = 'local-bsdtools' | 21 project = 'local-bsdtools' |
| 21 copyright = '2017-2022, Franz Glasner' | 22 copyright = '2017-2022, Franz Glasner' |
| 22 author = 'Franz Glasner' | 23 author = 'Franz Glasner' |
| 23 | 24 |
| 24 # The full version, including alpha/beta/rc tags | 25 # The full version, including alpha/beta/rc tags |
| 25 release = '0.18.2' | 26 with open(os.path.join(os.path.dirname(__file__), |
| 27 "..", | |
| 28 "Makefile"), "rb") as f: | |
| 29 release = re.search(b"^PORTVERSION\s*=\s*(\S+)", | |
| 30 f.read(), | |
| 31 re.MULTILINE).group(1).decode("ascii") | |
| 26 | 32 |
| 27 | 33 |
| 28 # -- General configuration --------------------------------------------------- | 34 # -- General configuration --------------------------------------------------- |
| 29 | 35 |
| 30 # Add any Sphinx extension module names here, as strings. They can be | 36 # Add any Sphinx extension module names here, as strings. They can be |
| 63 # -- Options for manual page output ------------------------------------------ | 69 # -- Options for manual page output ------------------------------------------ |
| 64 | 70 |
| 65 # One entry per manual page. List of tuples | 71 # One entry per manual page. List of tuples |
| 66 # (source start file, name, description, authors, manual section). | 72 # (source start file, name, description, authors, manual section). |
| 67 man_pages = [ | 73 man_pages = [ |
| 68 ("man/local-bsdtools", "local-bsdtools", 'FreeBSD specific administration helper tools', [author], 8), | 74 ("man/local-bsdtools", "local-bsdtools", 'FreeBSD specific administration helper tools v%s' % release, [author], 8), |
| 69 ("man/fzfs", "fzfs", "A ZFS management helper tool", [author], 8), | 75 ("man/fzfs", "fzfs", "A ZFS management helper tool", [author], 8), |
| 70 ("man/fzfs-mount", "fzfs-mount", "Mount ZFS datasets recursively", [author], 8), | 76 ("man/fzfs-mount", "fzfs-mount", "Mount ZFS datasets recursively", [author], 8), |
| 71 ("man/fzfs-umount", "fzfs-umount", "Unmount ZFS datasets recursively", [author], 8), | 77 ("man/fzfs-umount", "fzfs-umount", "Unmount ZFS datasets recursively", [author], 8), |
| 72 ] | 78 ] |
| 73 | 79 |
| 74 | 80 |
| 75 # -- Link to manual pages ---------------------------------------------------- | 81 # -- Link to manual pages ---------------------------------------------------- |
| 76 | 82 |
| 77 manpages_url = "https://www.freebsd.org/cgi/man.cgi?query={page}&sektion={section}" | 83 manpages_url = "https://www.freebsd.org/cgi/man.cgi?query={page}&sektion={section}" |
| 78 |
