From 1b502c359f69e5a86b705bb18c7141cf4d5507f3 Mon Sep 17 00:00:00 2001 From: maziggy Date: Wed, 10 Jun 2026 12:24:25 +0200 Subject: [PATCH] fix(installer): bootstrap setuptools + wheel into embedded Python MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit get-pip.py installs only pip itself; the embedded Python distribution ships without setuptools or wheel. pip needs setuptools.build_meta as the PEP 517 build backend for any sdist-only package — Bambuddy's requirements.txt hits this on pyftpdlib 2.2.0 (sdist-only on PyPI). Install both right after the pip bootstrap so requirements.txt installs cleanly. --- installers/windows/build.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/installers/windows/build.py b/installers/windows/build.py index f0a17583d..6e23ed969 100644 --- a/installers/windows/build.py +++ b/installers/windows/build.py @@ -116,6 +116,26 @@ def stage_embedded_python() -> Path: check=True, ) + # Install setuptools + wheel. The embedded distribution ships without + # them, and get-pip.py installs only pip — but pip needs + # ``setuptools.build_meta`` (PEP 517 backend) to build any source-only + # package. Bambuddy's requirements.txt hits this with pyftpdlib 2.2.0 + # which is sdist-only on PyPI; other source-only packages would fail + # the same way without this step. + log("installing setuptools + wheel for PEP 517 builds") + subprocess.run( + [ + str(target / "python.exe"), + "-m", + "pip", + "install", + "--no-warn-script-location", + "setuptools", + "wheel", + ], + check=True, + ) + return target