diff options
author | Ross Burton <ross@burtonini.com> | 2022-03-14 14:39:23 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-03-16 08:48:09 +0000 |
commit | 00bc2e68f98e8a868dac26fe2f45954fbfdc2222 (patch) | |
tree | ffbfa554732b8e718fdd2728f708c19956e35b2e /meta/recipes-devtools/python/python3-setuptools_59.5.0.bb | |
parent | c4cfeb96a337cd7790d18cdbb101a130845efc02 (diff) | |
download | poky-00bc2e68f98e8a868dac26fe2f45954fbfdc2222.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.
(From OE-Core rev: f780f6d920d8bbfb674d6066a8b899417decf8d2)
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-setuptools_59.5.0.bb')
-rw-r--r-- | meta/recipes-devtools/python/python3-setuptools_59.5.0.bb | 12 |
1 files changed, 4 insertions, 8 deletions
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 | |||
17 | 17 | ||
18 | DEPENDS += "${PYTHON_PN}" | 18 | DEPENDS += "${PYTHON_PN}" |
19 | 19 | ||
20 | # Avoid dependency loop; we bootstrap -native | ||
21 | DEPENDS:remove:class-native = "python3-pip-native python3-setuptools-native" | ||
22 | DEPENDS:append:class-native = " unzip-native" | ||
23 | |||
24 | do_install:class-native() { | ||
25 | python_pep517_do_bootstrap_install | ||
26 | } | ||
27 | |||
28 | RDEPENDS:${PN} = "\ | 20 | RDEPENDS:${PN} = "\ |
29 | ${PYTHON_PN}-2to3 \ | 21 | ${PYTHON_PN}-2to3 \ |
30 | ${PYTHON_PN}-compile \ | 22 | ${PYTHON_PN}-compile \ |
@@ -59,3 +51,7 @@ RDEPENDS:${PYTHON_PN}-pkg-resources = "\ | |||
59 | ${PYTHON_PN}-plistlib \ | 51 | ${PYTHON_PN}-plistlib \ |
60 | ${PYTHON_PN}-pprint \ | 52 | ${PYTHON_PN}-pprint \ |
61 | " | 53 | " |
54 | |||
55 | # This used to use the bootstrap install which didn't compile. Until we bump the | ||
56 | # tmpdir version we can't compile the native otherwise the sysroot unpack fails | ||
57 | INSTALL_WHEEL_COMPILE_BYTECODE:class-native = "--no-compile-bytecode" | ||