the docs now read the version number directly from pyproject.toml
This commit is contained in:
parent
0a96de5bb6
commit
04394f4011
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user