Blob Blame History Raw
diff -up ./docs/conf.py.docs ./docs/conf.py
--- ./docs/conf.py.docs	2024-03-20 16:32:11.073324519 +0100
+++ ./docs/conf.py	2024-03-20 16:34:09.935332044 +0100
@@ -15,9 +15,12 @@ import os
 import sys
 
 
-sys.path.insert(0, os.path.abspath("../"))
+try:
+    import tomllib
+except ImportError:
+    import tomli as tomllib
 
-import fedora_messaging  # noqa: E402
+topdir = os.path.abspath("../")
 
 
 # -- Project information -----------------------------------------------------
@@ -26,10 +29,14 @@ project = "Fedora Messaging"
 copyright = "2018, Red Hat, Inc"
 author = "Fedora Infrastructure"
 
-# The short X.Y version
-version = ".".join(fedora_messaging.__version__.split(".")[:2])
+with open(os.path.join(topdir, "pyproject.toml"), "rb") as f:
+    pyproject = tomllib.load(f)
+
 # The full version, including alpha/beta/rc tags
-release = fedora_messaging.__version__
+release = pyproject["tool"]["poetry"]["version"]
+
+# The short X.Y version
+version = ".".join(release.split(".")[:2])
 
 
 # -- General configuration ---------------------------------------------------