Commit Graph

8 Commits

Author SHA1 Message Date
Ross Burton
e5ab3817aa classes/setuptools_build_meta: rename to python_setuptools_build_meta
Rename this class to be python-prefixed to match the other new Python
build system classes.

(From OE-Core rev: 25d6bf8079797906bde7c0cf63a0466c981ba5bb)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-03-20 00:02:22 +00:00
Ross Burton
00bc2e68f9 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>
2022-03-16 08:48:09 +00:00
Ross Burton
a50bf48f90 meta: rename pip_install_wheel.bbclass to python_pep517.bbclass
pip_install_wheel shouldn't restricted to just using Pip to install
wheels (the installer module is simplier and likely a better option),
and in the future may be extended to also provide do_compile() using
the build module.

(From OE-Core rev: 3bdf64b97facce9706cc579bdbc9a80e0d48428f)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-03-13 12:23:48 +00:00
Ross Burton
5331d29a89 pip_install_wheel: add a generic do_install for bootstrapping
Several recipes are duplicating the same bootstrap logic for installing
a wheel without using any tools.  Add an implementation to
pip_install_wheel to centralise the code, and remove the duplicated code
from the following recipes:

- python3-flit-core
- python3-pip
- python3-setuptools
- python3-wheel

(From OE-Core rev: d5d702a2cd06f863340f8e4cdce0904c9d86384d)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-03-11 06:56:01 +00:00
Ross Burton
60fbc692fa python3-setuptools3: clean up PYPA_WHEEL usage
There's no need to set PYPA_WHEEL as the default is sufficient.

Remove the use of PYPA_WHEEL in the native do_install() as this variable
will be disappearing shortly.

Remove the bbfatal_log in the native do_install(), if this breaks then
something has gone very wrong and the user is not expected to fix it.

(From OE-Core rev: c0a24279c740555a06a5c57e2a01ca7b20f8e668)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-03-09 11:46:28 +00:00
Tim Orling
fffeecbd9a python3-setuptools: inherit setuptools_base_meta
Upstream provides a pyproject.toml which declares the
setuptools.build_meta backend for PEP-517 packaging.

We need to bootstrap python3-setuptools-native, simply installing by
unzipping the built wheel. This avoids a dependency loop.

[YOCTO #14638]

(From OE-Core rev: 889c05e5b4ce9a36b4ac3ac869c1ef55c2f8b566)

Signed-off-by: Tim Orling <tim.orling@konsulko.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-02-25 15:07:50 +00:00
Tim Orling
cb71f2ee5c python3-setuptools: do not depend on distutils
No longer depend on python3-distutils, current versions of setuptools
vendor as _distutils.

[YOCTO #14610]

(From OE-Core rev: 2b6735f648744c42484afec6edab6d5e130111e2)

Signed-off-by: Tim Orling <tim.orling@konsulko.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-01-12 21:09:02 +00:00
Alexander Kanavin
fa60634f03 python3-setuptools: upgrade 59.4.0 -> 59.5.0
(From OE-Core rev: 6dd8b4c08a6b4b5ab879d53f1e73d97ad02faa04)

Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2021-12-17 09:56:14 +00:00