From ecf8fcadbb886c33b2391578b032420950946bce Mon Sep 17 00:00:00 2001 From: "Jason R. Coombs" Date: Sun, 31 Mar 2024 19:03:25 -0400 Subject: [PATCH] Rely on jaraco.packaging.metadata for loading metadata. Ref pypa/build#556. Closes #19. --- newsfragments/19.feature.rst | 1 + pytest_checkdocs/__init__.py | 4 ++-- setup.cfg | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) create mode 100644 newsfragments/19.feature.rst diff --git a/newsfragments/19.feature.rst b/newsfragments/19.feature.rst new file mode 100644 index 0000000..6b23030 --- /dev/null +++ b/newsfragments/19.feature.rst @@ -0,0 +1 @@ +Rely on jaraco.packaging.metadata for loading metadata. diff --git a/pytest_checkdocs/__init__.py b/pytest_checkdocs/__init__.py index eb51d2d..caf9a87 100644 --- a/pytest_checkdocs/__init__.py +++ b/pytest_checkdocs/__init__.py @@ -3,7 +3,7 @@ import pytest import docutils.core -from build.util import project_wheel_metadata as load_metadata +from jaraco.packaging import metadata project_files = 'setup.py', 'setup.cfg', 'pyproject.toml' @@ -56,7 +56,7 @@ def system_message(reporter, level, message, *children, **kwargs): docutils.utils.Reporter.system_message = orig def get_long_description(self): - return Description.from_md(load_metadata('.')) + return Description.from_md(metadata.load('.')) @staticmethod def rst2html(value): diff --git a/setup.cfg b/setup.cfg index 947a908..46298ab 100644 --- a/setup.cfg +++ b/setup.cfg @@ -18,7 +18,7 @@ include_package_data = true python_requires = >=3.8 install_requires = docutils >= 0.15 - build >= 1.1 + jaraco.packaging >= 9.5 [options.extras_require] testing =