]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commitdiff
python3-setuptools: drop Windows launcher executables on non-mingw builds
authorKrupal Ka Patel <krkapate@cisco.com>
Mon, 9 Mar 2026 05:19:33 +0000 (22:19 -0700)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 12 Mar 2026 11:08:08 +0000 (11:08 +0000)
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 <krkapate@cisco.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-devtools/python/python3-setuptools_82.0.0.bb

index 40687ea7a3b26544d6be5e46dd149df74d06e10d..a6b48bf1451a692c47b1a00468f8e6736ab35ae3 100644 (file)
@@ -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} = "\