summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/python/python3-wheel_0.37.1.bb
diff options
context:
space:
mode:
authorRoss Burton <ross@burtonini.com>2022-03-14 14:39:23 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-03-16 08:48:04 +0000
commitf780f6d920d8bbfb674d6066a8b899417decf8d2 (patch)
tree10296314399b9f73ad02692f43776ed2ff0a2110 /meta/recipes-devtools/python/python3-wheel_0.37.1.bb
parentbf09c0bd99e4defbc259775b4a2e3fcce09bde17 (diff)
downloadopenembedded-core-contrib-f780f6d920d8bbfb674d6066a8b899417decf8d2.tar.gz
python_pep517: use installer instead of pip
Instead of battling pip to install a wheel, use installer. Installer does one thing, so it's faster and easier to work with. This means setuptools, pip, and wheel are no longer part of the bootstrap phase, so they can be built normally. To avoid sysroot file conflicts these three recipes can't install .pyc files to the native sysroot. We currently patch pypa/installer to allow us to override the interpreter used, which means we can drop the interpreter seding. We don't need to recompile any Python which is found in $bindir as Python doesn't actually load those files. Across a build of oe-core, the only differences between using pip and installer are: - the .dist-info/RECORD files are ordered differently - the .dist-info/REQUESTED and INSTALLER files are not created - the hashbang in native scripts is "/usr/bin/env nativepython" instead of pointing directly at the native sysroot python3. Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/python/python3-wheel_0.37.1.bb')
-rw-r--r--meta/recipes-devtools/python/python3-wheel_0.37.1.bb26
1 files changed, 4 insertions, 22 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 a339e65824..efd6c2f968 100644
--- a/meta/recipes-devtools/python/python3-wheel_0.37.1.bb
+++ b/meta/recipes-devtools/python/python3-wheel_0.37.1.bb
@@ -10,26 +10,8 @@ inherit flit_core pypi
SRC_URI += " file://0001-Backport-pyproject.toml-from-flit-backend-branch.patch"
-DEPENDS:remove:class-native = "python3-pip-native"
-
-do_install:class-native () {
- python_pep517_do_bootstrap_install
-
- # pip install would normally generate [project.scripts] in ${bindir}
- install -d ${D}/${bindir}
- cat << EOF >> ${D}/${bindir}/wheel
-#!/bin/sh
-'''exec' ${STAGING_BINDIR_NATIVE}/${PYTHON_PN}-native/${PYTHON_PN} "\$0" "\$@"
-' '''
-# -*- coding: utf-8 -*-
-import re
-import sys
-from wheel.cli import main
-if __name__ == '__main__':
- sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
- sys.exit(main())
-EOF
- chmod 0755 ${D}${bindir}/wheel
-}
-
BBCLASSEXTEND = "native nativesdk"
+
+# This used to use the bootstrap install which didn't compile. Until we bump the
+# tmpdir version we can't compile the native otherwise the sysroot unpack fails
+INSTALL_WHEEL_COMPILE_BYTECODE:class-native = "--no-compile-bytecode"