From 7203d8aa38f7bf4c46482b93eb875fb33ece4709 Mon Sep 17 00:00:00 2001 From: Patrick Lehmann Date: Sat, 4 Jul 2026 22:45:33 +0200 Subject: [PATCH] Fixed imports in Sphinx configuration. --- doc/conf.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/doc/conf.py b/doc/conf.py index 42be3e1..895d5cb 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -1,9 +1,10 @@ # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like shown here. -from sys import path as sys_path -from os.path import abspath -from pathlib import Path +from sys import path as sys_path +from os.path import abspath +from pathlib import Path +from textwrap import dedent from pyTooling.Packaging import extractVersionInformation @@ -11,8 +12,8 @@ # Project configuration # ============================================================================== githubNamespace = "edaa-org" -project = "pySVModel" -directoryName = project.replace('.', '/') +githubProject = pythonProject = "pySVModel" +directoryName = pythonProject.replace('.', '/') # ============================================================================== @@ -22,7 +23,7 @@ sys_path.insert(0, abspath(".")) sys_path.insert(0, abspath("..")) -sys_path.insert(0, abspath("../pySVModel")) +sys_path.insert(0, abspath(f"../{directoryName}")) # ============================================================================== @@ -34,6 +35,7 @@ packageInformationFile = Path(f"../{directoryName}/__init__.py") versionInformation = extractVersionInformation(packageInformationFile) +project = pythonProject author = versionInformation.Author copyright = versionInformation.Copyright version = ".".join(versionInformation.Version.split(".")[:2]) # e.g. 2.3 The short X.Y version.