From: Krupal Ka Patel <[email protected]>

pip vendors distlib which ships Windows launcher template binaries
(*.exe) under pip/_vendor/distlib. These files are only used on
Windows systems but are installed and packaged for target, native,
and nativesdk builds.

Remove the distlib *.exe templates when not building for a mingw
(mingw32/mingw64) host to avoid shipping unused Windows binaries and
reduce package noise.

Signed-off-by: Krupal Ka Patel <[email protected]>
---
 meta/recipes-devtools/python/python3-pip_26.0.bb | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/meta/recipes-devtools/python/python3-pip_26.0.bb 
b/meta/recipes-devtools/python/python3-pip_26.0.bb
index 0a284a1f6b..a1b2ba3350 100644
--- a/meta/recipes-devtools/python/python3-pip_26.0.bb
+++ b/meta/recipes-devtools/python/python3-pip_26.0.bb
@@ -28,6 +28,15 @@ SRC_URI += "file://no_shebang_mangling.patch"
 
 SRC_URI[sha256sum] = 
"3ce220a0a17915972fbf1ab451baae1521c4539e778b28127efa79b974aff0fa"
 
+do_install:append(){
+       # pip vendors distlib which ships Windows launcher templates (*.exe).
+       # Keep them only when building for a Windows (mingw) host.
+       case "${HOST_OS}" in
+               mingw32|mingw64) ;;
+               *) rm -f 
${D}${PYTHON_SITEPACKAGES_DIR}/pip/_vendor/distlib/*.exe ;;
+       esac
+}
+
 RDEPENDS:${PN} = "\
   python3-compile \
   python3-html \
-- 
2.35.6

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#232673): 
https://lists.openembedded.org/g/openembedded-core/message/232673
Mute This Topic: https://lists.openembedded.org/mt/118216486/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to