diff --git a/doc/conf.py b/doc/conf.py index c849e3969f8fd5cfd1ab50d1b188c3866ba01fbf..7454dfaf96141342d07e1deeb02c6d438a7eaae5 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.