Skip to contentSkip to conversation

python3-pip: drop unused Windows distlib launcher templates

OE-core [email protected] 1 participant 1 message Mar 9

lore
Share & tools
lore
#0 lore raw

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.

---
 meta/recipes-devtools/python/python3-pip_26.0.bb | 9 +++++++++
 1 file changed, 9 insertions(+)
meta/recipes-devtools/python/python3-pip_26.0.bb +9 -0
index 0a284a1f6b..a1b2ba3350 100644
@@ -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 \
Signature · 1 line
2.35.6