Commit Graph

6 Commits

Author SHA1 Message Date
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
c6ac203061 python3-wheel: clean up PYPA_WHEEL usage
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.

Also flit_core inherits setuptools3-base, so no need to inherit it again.

(From OE-Core rev: e2c7501645eec12d3168b6e8606549ce3e5f8db2)

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
ae5f415311 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>
2022-02-25 15:07:50 +00:00
Tim Orling
f4c43d7921 python3-wheel: inherit flit_core
Backport pyproject.toml from flit-backend branch.
Inherit flit_core class to build
Inherit pip_install_wheel to install wheels for target

We need to bootstrap python3-wheel-native in order to have bdist_wheel
available to python3-setuptools-native and the refactored
setuptools3.bbclass. Simply unzip the wheel into
PYTHON_SITEPACKAGES_DIR for class-native.

[YOCTO #14638]

(From OE-Core rev: 764d0c2e079b3511afe03deadf3ec922e41b89aa)

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
cb0aa0d09a python3-wheel: move 0.37.1 from meta-python
This is one of the "new build tools" which are part of pypa (Python
Packaging Authority) toolchain.

Wheels are the official delivery mechanism for Python packages, replacing
the now deprecated Eggs (egg-info).

[YOCTO #14638]

(From OE-Core rev: 78a4bccfa38c2d3a6a4a097319eec28c2bc357a7)

Signed-off-by: Tim Orling <tim.orling@konsulko.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-02-25 12:41:23 +00:00