From 1c6186adc46f80ddd1a0c5058204eabc0babdc1c Mon Sep 17 00:00:00 2001 From: Benjamin Kiessling Date: Sat, 20 Apr 2024 17:55:33 +0200 Subject: [PATCH] make sphinx build work without installed kraken --- docs/conf.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index eaf7d1e3b..62c2b92bd 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -3,15 +3,16 @@ # For the full list of built-in configuration values, see the documentation: # https://www.sphinx-doc.org/en/master/usage/configuration.html -import importlib.metadata - # -- Project information ----------------------------------------------------- # https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information project = 'kraken' copyright = '2015-2024, Benjamin Kiessling' author = 'Benjamin Kiessling' -release = importlib.metadata.version('kraken') + +from subprocess import Popen, PIPE +pipe = Popen('git describe --tags --always main', stdout=PIPE, shell=True) +release = pipe.stdout.read().decode('utf-8') extensions = [ 'sphinx.ext.autodoc',