From 3e836d2880de1952d8ace7fa1b83d52954eebf5e Mon Sep 17 00:00:00 2001 From: Stefano Rivera Date: Mon, 28 Apr 2025 12:00:07 -0400 Subject: [PATCH] Automatically do --no-use-pep517 builds, even without wheel In #13330 I removed the command line argument check for this, but I hadn't realized that there were also heuristics that needed to be fixed. --- news/13358.bugfix.rst | 1 + src/pip/_internal/pyproject.py | 6 +----- 2 files changed, 2 insertions(+), 5 deletions(-) create mode 100644 news/13358.bugfix.rst 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