From: Krupal Ka Patel <[email protected]>

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 <[email protected]>
Signed-off-by: Mathieu Dubois-Briand <[email protected]>
Signed-off-by: Richard Purdie <[email protected]>
(cherry picked from commit cf7c79f3962f2be99cfda47e8cc730091e6a18cb)
Signed-off-by: Yoann Congal <[email protected]>
---
 .../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 46b2f0ab008..00f83056dbf 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} = "\
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#233575): 
https://lists.openembedded.org/g/openembedded-core/message/233575
Mute This Topic: https://lists.openembedded.org/mt/118410913/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to