From: Michael R. Crusoe <crusoe@debian.org>
Subject: allow doc building without installing cwl-utils first
Origin: upstream, https://github.com/common-workflow-language/cwl-utils/commit/deb41bf224c7e870732f9747ba51d82dc3d059fc
Forwarded: not-needed
--- cwl-utils.orig/docs/conf.py
+++ cwl-utils/docs/conf.py
@@ -6,7 +6,6 @@
 
 # -- Path setup --------------------------------------------------------------
 
-import importlib.metadata
 
 # 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
@@ -17,8 +16,7 @@
 import time
 from datetime import datetime, timezone
 
-sys.path.insert(0, os.path.abspath(".."))
-
+from cwl_utils.__meta__ import __version__
 
 # -- Project information -----------------------------------------------------
 
@@ -82,8 +80,7 @@
 # so a file named "default.css" will overwrite the builtin "default.css".
 html_static_path = ["_static"]
 
-release = importlib.metadata.version("cwl_utils")
-version = ".".join(release.split(".")[:2])
+version = __version__
 
 autoapi_dirs = ["../cwl_utils"]
 autodoc_typehints = "description"
