summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorTim Orling <ticotimo@gmail.com>2022-02-23 14:09:13 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-02-25 15:07:50 +0000
commitae5f41531160aad73fba5ee01cb580c812546437 (patch)
treee4ea2f97045e84070e1add96e342c9d320cf93ff /meta
parent3dbb469523e952a5cc8a209a5be9747ebe9a0ff0 (diff)
downloadpoky-ae5f41531160aad73fba5ee01cb580c812546437.tar.gz
python3-wheel-native: install ${bindir}/wheel
pip install would normally install [project.scripts] to ${D}${bindir} but our naïve bootstrapping only unzipps the wheel to ${D}${PYTHON_SITEPACKAGES_DIR}. Correct this by creating the equivalent script in do_install:class-native [YOCTO #14739] (From OE-Core rev: 19e83270d17984cf6b471c387eb08103816b359f) Signed-off-by: Tim Orling <tim.orling@konsulko.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-devtools/python/python3-wheel_0.37.1.bb16
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 -*-
29import re
30import sys
31from wheel.cli import main
32if __name__ == '__main__':
33 sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
34 sys.exit(main())
35EOF
36 chmod 0755 ${D}${bindir}/wheel
21} 37}
22 38
23BBCLASSEXTEND = "native nativesdk" 39BBCLASSEXTEND = "native nativesdk"