From 7278efa867e5ab03efedf529728cdb1e8bcdc8d3 Mon Sep 17 00:00:00 2001 From: Gael Pasgrimaud Date: Fri, 5 Jul 2024 14:14:49 +0200 Subject: [PATCH] use importlib.metadata to get project's version in sphinx conf --- docs/conf.py | 4 ++-- setup.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index cab66ed..6a230a8 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -59,8 +59,8 @@ # 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. -import pkg_resources -version = pkg_resources.get_distribution(project).version +import importlib.metadata +version = importlib.metadata.version(project) release = version # The language for content autogenerated by Sphinx. Refer to documentation diff --git a/setup.py b/setup.py index a021f19..f10dc74 100644 --- a/setup.py +++ b/setup.py @@ -23,7 +23,7 @@ docs_extras = [ 'docutils', 'pylons-sphinx-themes >= 1.0.8', - 'Sphinx >= 1.8.1', + 'Sphinx >= 3.0.0', ] setup(name='WebTest',