diff --git a/HISTORY.rst b/HISTORY.rst index d9f4fba2..f404fae4 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -7,6 +7,9 @@ Unreleased Changes References to the old name and website domain have been updated to reflect this change. https://github.com/natcap/pygeoprocessing/issues/458 +* Fixing a build issue with readthedocs builds due to the deprecation of + ``pkg_resources``. + https://github.com/natcap/pygeoprocessing/issues/469 * The average value of valid pixels is now computed in ``pygeoprocessing.zonal_statistics`` for each feature. https://github.com/natcap/pygeoprocessing/issues/370 diff --git a/docs/source/conf.py b/docs/source/conf.py index a06405e3..5af9a8d2 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -6,16 +6,17 @@ # -- Path setup -------------------------------------------------------------- +import datetime +import os # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like shown here. # # import sys # sys.path.insert(0, os.path.abspath('.')) -import datetime -import os +from importlib.metadata import version + import sphinx.ext.apidoc -from pkg_resources import get_distribution # -- Project information ----------------------------------------------------- @@ -77,5 +78,5 @@ os.path.join(DOCS_SOURCE_DIR, '..', '..', 'src', 'pygeoprocessing'), ]) -release = get_distribution('pygeoprocessing').version +release = version('pygeoprocessing') version = '.'.join(release.split('.')[:2])