From b4034a881e0cf476bbdc19e984a9762bb260ad39 Mon Sep 17 00:00:00 2001 From: Miodrag Milanovic Date: Tue, 7 May 2024 15:35:25 +0200 Subject: [PATCH] Keep docs version in conf.py --- Makefile | 2 +- docs/source/conf.py | 19 +++++++++---------- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/Makefile b/Makefile index 6711751b62d..56efaf5eb0f 100644 --- a/Makefile +++ b/Makefile @@ -1012,7 +1012,7 @@ docs/reqs: DOC_TARGET ?= html docs: docs/source/cmd/abc.rst docs/gen_examples docs/gen_images docs/guidelines docs/usage docs/reqs - $(Q) YOSYS_VER=$(YOSYS_VER) $(MAKE) -C docs $(DOC_TARGET) + $(Q) $(MAKE) -C docs $(DOC_TARGET) clean: rm -rf share diff --git a/docs/source/conf.py b/docs/source/conf.py index aed3fddff7c..4e46cfad1b8 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -4,7 +4,8 @@ project = 'YosysHQ Yosys' author = 'YosysHQ GmbH' -copyright ='2022 YosysHQ GmbH' +copyright ='2024 YosysHQ GmbH' +yosys_ver = "0.40" # select HTML theme html_theme = 'furo' @@ -46,12 +47,18 @@ autosectionlabel_prefix_document = True autosectionlabel_maxdepth = 1 +# set version +if os.getenv("READTHEDOCS") and os.getenv("READTHEDOCS_VERSION") == "latest": + release = yosys_ver + "-dev" +else: + release = yosys_ver + # assign figure numbers numfig = True bibtex_bibfiles = ['literature.bib'] - latex_elements = { + 'releasename': ' ', 'preamble': r''' \usepackage{lmodern} \usepackage{comment} @@ -63,14 +70,6 @@ extensions.append('sphinx.ext.todo') todo_include_todos = False -# attempt to get version -env_yosys_ver = os.getenv("YOSYS_VER") -if env_yosys_ver: - if os.getenv("READTHEDOCS") and os.getenv("READTHEDOCS_VERSION") == "latest": - release = env_yosys_ver + "-dev" - else: - release = env_yosys_ver - # custom cmd-ref parsing/linking sys.path += [os.path.dirname(__file__) + "/../"] extensions.append('util.cmdref')