From: Krupal Ka Patel Date: Mon, 9 Mar 2026 05:19:33 +0000 (-0700) Subject: python3-setuptools: drop Windows launcher executables on non-mingw builds X-Git-Tag: uninative-5.1~14 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=cf7c79f3962f2be99cfda47e8cc730091e6a18cb;p=thirdparty%2Fopenembedded%2Fopenembedded-core.git 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. Signed-off-by: Krupal Ka Patel Signed-off-by: Mathieu Dubois-Briand Signed-off-by: Richard Purdie --- diff --git a/meta/recipes-devtools/python/python3-setuptools_82.0.0.bb b/meta/recipes-devtools/python/python3-setuptools_82.0.0.bb index 40687ea7a3..a6b48bf145 100644 --- a/meta/recipes-devtools/python/python3-setuptools_82.0.0.bb +++ b/meta/recipes-devtools/python/python3-setuptools_82.0.0.bb @@ -13,6 +13,15 @@ SRC_URI += " \ SRC_URI[sha256sum] = "22e0a2d69474c6ae4feb01951cb69d515ed23728cf96d05513d36e42b62b37cb" +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} = "\