From cf294aa04090d416adfc5a4fdb4fc72c1b593479 Mon Sep 17 00:00:00 2001 From: Olof Kindgren Date: Mon, 7 Oct 2024 09:19:33 +0200 Subject: [PATCH] Fix version detection in Sphinx config --- doc/source/conf.py | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/doc/source/conf.py b/doc/source/conf.py index 14803e5e..91d10c2d 100644 --- a/doc/source/conf.py +++ b/doc/source/conf.py @@ -12,7 +12,6 @@ import os import sys from datetime import datetime -from distutils.version import LooseVersion import jsonschema2md @@ -36,16 +35,10 @@ author = "Olof Kindgren" # The full version, including alpha/beta/rc tags. -try: - from fusesoc.version import version as __version__ -except ImportError: - __version__ = "unknown" +release: str = get_version("fusesoc") -release = __version__ # The short X.Y version. -# v_major, v_minor = LooseVersion(release).version[:2] -# version = f"{v_major}.{v_minor}" -version = "2.4" +version: str = ".".join(release.split(".")[:2]) # -- General configuration ---------------------------------------------------