diff options
Diffstat (limited to 'meta')
-rw-r--r-- | meta/recipes-devtools/python/python3-pip_22.0.3.bb | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/meta/recipes-devtools/python/python3-pip_22.0.3.bb b/meta/recipes-devtools/python/python3-pip_22.0.3.bb index 023ab41810..e02ea5bd3d 100644 --- a/meta/recipes-devtools/python/python3-pip_22.0.3.bb +++ b/meta/recipes-devtools/python/python3-pip_22.0.3.bb | |||
@@ -24,6 +24,23 @@ do_install:class-native() { | |||
24 | install -d ${D}${PYTHON_SITEPACKAGES_DIR} | 24 | install -d ${D}${PYTHON_SITEPACKAGES_DIR} |
25 | unzip -d ${D}${PYTHON_SITEPACKAGES_DIR} ${PYPA_WHEEL} || \ | 25 | unzip -d ${D}${PYTHON_SITEPACKAGES_DIR} ${PYPA_WHEEL} || \ |
26 | bbfatal_log "Failed to unzip wheel: ${PYPA_WHEEL}. Check the logs." | 26 | bbfatal_log "Failed to unzip wheel: ${PYPA_WHEEL}. Check the logs." |
27 | |||
28 | # pip install would normally generate [console_scripts] in ${bindir} | ||
29 | install -d ${D}/${bindir} | ||
30 | # We will skip the ${bindir}/pip variant as we would just remove it in the do_install:append | ||
31 | cat << EOF >> ${D}/${bindir}/pip3 | tee ${D}/${bindir}/pip${PYTHON_BASEVERSION} | ||
32 | #!/bin/sh | ||
33 | '''exec' ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} "\$0" "\$@" | ||
34 | ' ''' | ||
35 | # -*- coding: utf-8 -*- | ||
36 | import re | ||
37 | import sys | ||
38 | from pip._internal.cli.main import main | ||
39 | if __name__ == '__main__': | ||
40 | sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) | ||
41 | sys.exit(main()) | ||
42 | EOF | ||
43 | chmod 0755 ${D}${bindir}/pip3 ${D}${bindir}/pip${PYTHON_BASEVERSION} | ||
27 | } | 44 | } |
28 | 45 | ||
29 | do_install:append() { | 46 | do_install:append() { |