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