diff --git a/pyproject.toml b/pyproject.toml index ca2338e5..583480fc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -36,7 +36,7 @@ dependencies = [ "pyproject_hooks", # not actually a runtime dependency, only supplied as there is not "recommended dependency" support 'colorama; os_name == "nt"', - 'importlib-metadata >= 0.22; python_version < "3.8"', + 'importlib-metadata >= 4.6; python_version < "3.10"', 'tomli >= 1.1.0; python_version < "3.11"', ] diff --git a/src/build/_importlib.py b/src/build/_importlib.py index 3f4b2049..260ddbd2 100644 --- a/src/build/_importlib.py +++ b/src/build/_importlib.py @@ -1,7 +1,7 @@ import sys -if sys.version_info >= (3, 8): +if sys.version_info >= (3, 10): from importlib import metadata else: import importlib_metadata as metadata