From ac73749ed228b996ea56be68c8276b92c98d9b61 Mon Sep 17 00:00:00 2001 From: Yannick DAYER <yannick.dayer@idiap.ch> Date: Mon, 10 Jun 2024 15:59:31 +0200 Subject: [PATCH] doc(config): update to use importlib.metadata. --- doc/conf.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/doc/conf.py b/doc/conf.py index 29a7a7c..47c94bb 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -1,9 +1,11 @@ #!/usr/bin/env python # vim: set fileencoding=utf-8 : +import importlib.metadata import os +import time -import pkg_resources +import sphinx_rtd_theme # -- General configuration ----------------------------------------------------- @@ -74,21 +76,20 @@ master_doc = "index" # General information about the project. project = "bob.bio.vein" -import time copyright = "%s, Idiap Research Institute" % time.strftime("%Y") # Grab the setup entry -distribution = pkg_resources.require(project)[0] +distribution = importlib.metadata.version(project) # The version info for the project you're documenting, acts as replacement for # |version| and |release|, also used in various other places throughout the # built documents. # # The short X.Y version. -version = distribution.version +version = distribution # The full version, including alpha/beta/rc tags. -release = distribution.version +release = distribution # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. @@ -134,7 +135,6 @@ owner = ["Idiap Research Institute"] # The theme to use for HTML and HTML Help pages. See the documentation for # a list of builtin themes. -import sphinx_rtd_theme html_theme = "sphinx_rtd_theme" -- GitLab