Skip to content

Commit

Permalink
Switch to 'build' for loading package metadata.
Browse files Browse the repository at this point in the history
Required disabling doctests due to pytest-dev/pytest#3396 and the fact that build imports `packaging`.
  • Loading branch information
jaraco committed Sep 28, 2022
1 parent 7c363d4 commit 90e339b
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
5 changes: 5 additions & 0 deletions CHANGES.rst
@@ -1,3 +1,8 @@
v9.1.0
======

Prefer ``build`` to ``pep517`` for loading package metadata.

v9.0.0
======

Expand Down
4 changes: 2 additions & 2 deletions jaraco/packaging/sphinx.py
@@ -1,7 +1,7 @@
import os
import subprocess

import pep517.meta
from build.util import project_wheel_metadata as load_metadata

try:
import importlib.metadata as metadata
Expand All @@ -27,7 +27,7 @@ def load_config_from_setup(app):
"""
# for now, assume project root is one level up
root = os.path.join(app.confdir, '..')
meta = pep517.meta.load(root).metadata
meta = load_metadata(root)
app.config.project = meta['Name']
app.config.version = app.config.release = meta['Version']
app.config.package_url = meta['Home-page']
Expand Down
3 changes: 2 additions & 1 deletion pytest.ini
@@ -1,6 +1,7 @@
[pytest]
norecursedirs=dist build .tox .eggs
addopts=--doctest-modules
# Disabled due to pytest-dev/pytest#3396
# addopts=--doctest-modules
doctest_optionflags=ALLOW_UNICODE ELLIPSIS
filterwarnings=
# Suppress deprecation warning in flake8
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Expand Up @@ -19,7 +19,7 @@ include_package_data = true
python_requires = >=3.7
install_requires =
importlib_metadata; python_version < "3.8"
pep517
build

[options.packages.find]
exclude =
Expand Down

0 comments on commit 90e339b

Please sign in to comment.