diff --git a/news/13358.bugfix.rst b/news/13358.bugfix.rst new file mode 100644 index 00000000000..e2c6fbe02da --- /dev/null +++ b/news/13358.bugfix.rst @@ -0,0 +1 @@ +Automatically use the legacy (non-PEP517) mode even without the ``wheel`` package. diff --git a/src/pip/_internal/pyproject.py b/src/pip/_internal/pyproject.py index 0e8452f39dc..d319b483b7f 100644 --- a/src/pip/_internal/pyproject.py +++ b/src/pip/_internal/pyproject.py @@ -105,11 +105,7 @@ def load_pyproject_toml( # https://discuss.python.org/t/pip-without-setuptools-could-the-experience-be-improved/11810/9 # https://github.com/pypa/pip/issues/8559 elif use_pep517 is None: - use_pep517 = ( - has_pyproject - or not importlib.util.find_spec("setuptools") - or not importlib.util.find_spec("wheel") - ) + use_pep517 = has_pyproject or not importlib.util.find_spec("setuptools") # At this point, we know whether we're going to use PEP 517. assert use_pep517 is not None