diff options
-rw-r--r-- | meta/recipes-devtools/python/python3-wheel_0.37.1.bb | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/meta/recipes-devtools/python/python3-wheel_0.37.1.bb b/meta/recipes-devtools/python/python3-wheel_0.37.1.bb index c7354c9d98..91bff82509 100644 --- a/meta/recipes-devtools/python/python3-wheel_0.37.1.bb +++ b/meta/recipes-devtools/python/python3-wheel_0.37.1.bb | |||
@@ -18,6 +18,22 @@ do_install:class-native () { | |||
18 | PYPA_WHEEL="${B}/dist/${PYPI_PACKAGE}-${PV}-*.whl" | 18 | PYPA_WHEEL="${B}/dist/${PYPI_PACKAGE}-${PV}-*.whl" |
19 | unzip -d ${D}${PYTHON_SITEPACKAGES_DIR} ${PYPA_WHEEL} || \ | 19 | unzip -d ${D}${PYTHON_SITEPACKAGES_DIR} ${PYPA_WHEEL} || \ |
20 | bbfatal_log "Failed to install" | 20 | bbfatal_log "Failed to install" |
21 | |||
22 | # pip install would normally generate [project.scripts] in ${bindir} | ||
23 | install -d ${D}/${bindir} | ||
24 | cat << EOF >> ${D}/${bindir}/wheel | ||
25 | #!/bin/sh | ||
26 | '''exec' ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} "\$0" "\$@" | ||
27 | ' ''' | ||
28 | # -*- coding: utf-8 -*- | ||
29 | import re | ||
30 | import sys | ||
31 | from wheel.cli import main | ||
32 | if __name__ == '__main__': | ||
33 | sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0]) | ||
34 | sys.exit(main()) | ||
35 | EOF | ||
36 | chmod 0755 ${D}${bindir}/wheel | ||
21 | } | 37 | } |
22 | 38 | ||
23 | BBCLASSEXTEND = "native nativesdk" | 39 | BBCLASSEXTEND = "native nativesdk" |