Automatically get docs version from pyproject.toml, bump copyright year

Signed-off-by: Dan Yeaw <dan@yeaw.me>
This commit is contained in:
Dan Yeaw 2019-06-08 22:00:29 -04:00
parent 28c4b6e129
commit 60aa1d7b74
No known key found for this signature in database
GPG Key ID: 77A923EF537B61A4
2 changed files with 12 additions and 4 deletions

View File

@ -15,18 +15,22 @@
# import os
# import sys
# sys.path.insert(0, os.path.abspath('.'))
from pathlib import Path
from tomlkit import parse
# -- Project information -----------------------------------------------------
project = "Gaphas"
copyright = "2018, Arjan J. Molenaar"
copyright = "2019, Arjan J. Molenaar"
author = "Arjan J. Molenaar"
# The short X.Y version
version = ""
# The full version, including alpha/beta/rc tags
release = "1.0.0"
project_dir = Path(__file__).resolve().parent.parent
f = project_dir.joinpath("pyproject.toml")
release = str(parse(f.read_text())["tool"]["poetry"]["version"])
# -- General configuration ---------------------------------------------------

View File

@ -1,2 +1,6 @@
sphinx==1.8.3
sphinx_rtd_theme==0.4.2
sphinx==2.1.0
docutils==0.14
Pygments==2.4.2
sphinx-rtd-theme==0.4.3
sphinxcontrib-websupport==1.1.2
tomlkit==0.5.3