1
0
mirror of synced 2025-02-22 13:10:41 +01:00

the docs now read the version number directly from pyproject.toml

This commit is contained in:
Stepland 2022-11-03 21:26:22 +01:00
parent 0a96de5bb6
commit 04394f4011

View File

@ -5,8 +5,12 @@
import os
import sys
from pathlib import Path
sys.path.append(os.path.join(os.path.dirname(__file__), "../.."))
import toml
project_root = Path(__file__).parents[2]
sys.path.append(str(project_root))
# -- Project information -----------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
@ -14,7 +18,11 @@ sys.path.append(os.path.join(os.path.dirname(__file__), "../.."))
project = "jubeatools"
copyright = "2022, Stepland"
author = "Stepland"
release = "1.4.0"
with open(project_root / "pyproject.toml") as f:
pyproject = toml.load(f)
release = pyproject["tool"]["poetry"]["version"]
# -- General configuration ---------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration