conf.py -> get build123d version from setuptools_scm for RTD

This commit is contained in:
jdegenstein 2024-02-28 16:52:53 -06:00 committed by GitHub
parent 659ce3a0f4
commit cb64016237
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -12,6 +12,7 @@
#
import os
import sys
import build123d
build123d_path = os.path.dirname(os.path.abspath(os.getcwd()))
source_files_path = os.path.join(build123d_path, "src", "build123d")
@ -27,11 +28,8 @@ copyright = "2022, Gumyr"
author = "Gumyr"
# The full version, including alpha/beta/rc tags
with open(os.path.join(build123d_path, "pyproject.toml")) as f:
pyproject_toml = f.readlines()
for line in pyproject_toml:
if "version =" in line:
release = line.split("=")[1].strip()
# version = build123d.__version__
release = build123d.__version__
# -- General configuration ---------------------------------------------------