Skip to content

Commit

Permalink
use importlib.metadata to get project's version in sphinx conf
Browse files Browse the repository at this point in the history
  • Loading branch information
gawel committed Jul 5, 2024
1 parent 922607a commit 7278efa
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
docs_extras = [
'docutils',
'pylons-sphinx-themes >= 1.0.8',
'Sphinx >= 1.8.1',
'Sphinx >= 3.0.0',
]

setup(name='WebTest',
Expand Down

0 comments on commit 7278efa

Please sign in to comment.