From 00bc2e68f98e8a868dac26fe2f45954fbfdc2222 Mon Sep 17 00:00:00 2001 From: Ross Burton Date: Mon, 14 Mar 2022 14:39:23 +0000 Subject: 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. (From OE-Core rev: f780f6d920d8bbfb674d6066a8b899417decf8d2) Signed-off-by: Ross Burton Signed-off-by: Richard Purdie --- meta/recipes-devtools/python/python3-setuptools_59.5.0.bb | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'meta/recipes-devtools/python/python3-setuptools_59.5.0.bb') diff --git a/meta/recipes-devtools/python/python3-setuptools_59.5.0.bb b/meta/recipes-devtools/python/python3-setuptools_59.5.0.bb index d93972b9a0..35bec19e33 100644 --- a/meta/recipes-devtools/python/python3-setuptools_59.5.0.bb +++ b/meta/recipes-devtools/python/python3-setuptools_59.5.0.bb @@ -17,14 +17,6 @@ SRC_URI[sha256sum] = "d144f85102f999444d06f9c0e8c737fd0194f10f2f7e5fdb77573f6e2f DEPENDS += "${PYTHON_PN}" -# Avoid dependency loop; we bootstrap -native -DEPENDS:remove:class-native = "python3-pip-native python3-setuptools-native" -DEPENDS:append:class-native = " unzip-native" - -do_install:class-native() { - python_pep517_do_bootstrap_install -} - RDEPENDS:${PN} = "\ ${PYTHON_PN}-2to3 \ ${PYTHON_PN}-compile \ @@ -59,3 +51,7 @@ RDEPENDS:${PYTHON_PN}-pkg-resources = "\ ${PYTHON_PN}-plistlib \ ${PYTHON_PN}-pprint \ " + +# 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" -- cgit v1.2.3-54-g00ecf