Skip to contentSkip to conversation

libselinux-python: fix No module named pip

PATCH New Vincent Davis Jr 1 participant 2 messages Aug 23, 2025

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/2 libselinux-python: fix No module named pip

When running the do install task run
into No modules named pip.

Add python3-pip-native to DEPENDS
so that pip it available.

---
 recipes-security/selinux/libselinux-python_3.9.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
recipes-security/selinux/libselinux-python_3.9.bb +1 -1
index 8431ca1..a4de036 100644
@@ -19,7 +19,7 @@ SRC_URI += "\
 
 S = "${UNPACKDIR}/${BP}/libselinux"
 
-DEPENDS = "libsepol libpcre2 swig-native python3-setuptools-scm-native"
+DEPENDS = "libsepol libpcre2 swig-native python3-setuptools-scm-native python3-pip-native"
 DEPENDS:append:libc-musl = " fts"
 
 RDEPENDS:${PN} = "libselinux python3-core python3-shell"
Signature · 1 line
2.43.0
#1 lore raw

PATCH v2 2/2 selinux-python: fix No module named pip

When running the do install task run into No modules named pip.

Add python3-pip-native to DEPENDS so that pip it available.

PREFIX variable not being set also appears to effect whether pip is found or not. No reason was found as to why that is.

---
 recipes-security/selinux/selinux-python_3.9.bb | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
recipes-security/selinux/selinux-python_3.9.bb +4 -2
index b452887..88850ad 100644
@@ -16,7 +16,7 @@ SRC_URI += "file://0001-sepolicy-fix-install-path-for-new-pymodule-sepolicy.patc
 
 S = "${UNPACKDIR}/${BP}/python"
 
-DEPENDS = "libsepol libselinux gettext-native python3-setuptools-scm-native"
+DEPENDS = "libsepol libselinux gettext-native python3-setuptools-scm-native python3-pip-native"
 
 RDEPENDS:${PN} = "\
         python3-core \
@@ -111,7 +111,9 @@ FILES:${PN} += "\
 "
 
 do_install() {
-    oe_runmake DESTDIR="${D}" \
+    oe_runmake \
+        DESTDIR="${D}" \
+        PREFIX=${prefix} \
         PYLIBVER='python${PYTHON_BASEVERSION}' \
         PYTHONLIBDIR='${PYTHON_SITEPACKAGES_DIR}' \
         install
Signature · 1 line
2.43.0