From abff79524878b97dd074fbcd1b482b2aebc87d18 Mon Sep 17 00:00:00 2001 From: Yannick DAYER <yannick.dayer@idiap.ch> Date: Fri, 7 Jun 2024 15:14:49 +0200 Subject: [PATCH] doc(conf): update to use importlib.metadata --- doc/conf.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/doc/conf.py b/doc/conf.py index c849e39..7454dfa 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -1,10 +1,10 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- +import importlib.metadata import os import time -import pkg_resources import sphinx_rtd_theme # -- General configuration ----------------------------------------------------- @@ -38,7 +38,7 @@ nitpick_ignore = [] # Allows the user to override warnings from a separate file if os.path.exists("nitpick-exceptions.txt"): for line in open("nitpick-exceptions.txt"): - if line.strip() == "" or line.startswith("#"): + if line.strip() == "" or line.strip().startswith("#"): continue dtype, target = line.split(None, 1) target = target.strip() @@ -76,16 +76,16 @@ project = "bob.pipelines" 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. -- GitLab