From 6637678682c305c8fc6bbc75e29781ac78af6cb7 Mon Sep 17 00:00:00 2001 From: Krupal Ka Patel Date: Sun, 8 Mar 2026 22:18:26 -0700 Subject: [PATCH] python3-pip: drop unused Windows distlib launcher templates 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. (From OE-Core rev: 9f2a6cfda6a2305f52411ca8121f27c8a5a91fa2) Signed-off-by: Krupal Ka Patel Signed-off-by: Mathieu Dubois-Briand Signed-off-by: Richard Purdie (cherry picked from commit 90d208fbb06b6e6b5aaddb0048fd6e2e1d46c8bd) Signed-off-by: Yoann Congal Signed-off-by: Paul Barker --- meta/recipes-devtools/python/python3-pip_24.0.bb | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/meta/recipes-devtools/python/python3-pip_24.0.bb b/meta/recipes-devtools/python/python3-pip_24.0.bb index 12a5e1cc3c..cf123a5d23 100644 --- a/meta/recipes-devtools/python/python3-pip_24.0.bb +++ b/meta/recipes-devtools/python/python3-pip_24.0.bb @@ -41,6 +41,15 @@ do_install:append() { rm -f ${D}/${bindir}/pip } +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-io \