Skip to content

Commit 8a3a662

Browse files
committed
Use importlib instead of pkg_resources for version
1 parent af4d170 commit 8a3a662

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

docs/requirements.txt

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
sphinx
22
recommonmark
33
pandoc
4+
importlib-metadata

docs/source/conf.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
# sys.path.insert(0, os.path.abspath('.'))
1616
import datetime
1717

18-
import pkg_resources
18+
from importlib.metadata import version as package_version
1919

2020
# The master toctree document.
2121
master_doc = "index"
@@ -25,7 +25,7 @@
2525

2626
project = "bmi-topography"
2727
author = "Community Surface Dynamics Modeling System"
28-
version = pkg_resources.get_distribution("bmi_topography").version
28+
version = package_version("bmi_topography")
2929
release = version
3030
this_year = datetime.date.today().year
3131
copyright = f"{this_year}, {author}"

0 commit comments

Comments
 (0)