From 8acfa6cc83191a62fef0f451aff493ac60e0ee34 Mon Sep 17 00:00:00 2001 From: Krupal Ka Patel Date: Sun, 8 Mar 2026 22:19:33 -0700 Subject: [PATCH] python3-setuptools: drop Windows launcher executables on non-mingw builds setuptools installs Windows launcher executables (cli*.exe, gui*.exe) into site-packages. These binaries are only used on Windows platforms but are packaged for target, native, and nativesdk builds. Remove the Windows launcher executables when not building for a mingw (mingw32/mingw64) host to avoid shipping unused Windows binaries. (From OE-Core rev: a618c504ba69d20eec08944c577b15a48b1ac578) Signed-off-by: Krupal Ka Patel Signed-off-by: Mathieu Dubois-Briand Signed-off-by: Richard Purdie (cherry picked from commit cf7c79f3962f2be99cfda47e8cc730091e6a18cb) Signed-off-by: Yoann Congal Signed-off-by: Paul Barker --- .../recipes-devtools/python/python3-setuptools_69.1.1.bb | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/meta/recipes-devtools/python/python3-setuptools_69.1.1.bb b/meta/recipes-devtools/python/python3-setuptools_69.1.1.bb index 46b2f0ab00..00f83056db 100644 --- a/meta/recipes-devtools/python/python3-setuptools_69.1.1.bb +++ b/meta/recipes-devtools/python/python3-setuptools_69.1.1.bb @@ -19,6 +19,15 @@ SRC_URI += " \ SRC_URI[sha256sum] = "5c0806c7d9af348e6dd3777b4f4dbb42c7ad85b190104837488eab9a7c945cf8" +do_install:append() { + # setuptools ships Windows launcher executables (cli*.exe, gui*.exe). + # Keep them only when building for a Windows (mingw) host. + case "${HOST_OS}" in + mingw32|mingw64) ;; + *) rm -f ${D}${PYTHON_SITEPACKAGES_DIR}/setuptools/*.exe ;; + esac +} + DEPENDS += "python3" RDEPENDS:${PN} = "\