Commit Graph

6 Commits

Author SHA1 Message Date
Ross Burton
2df212ff6c flit_core: add variable to control where pyproject.toml is located
The PEP517[1] pyproject.toml doesn't have to be located at the top-level
of the source tree (for example, in recipes with multiple components), so
add a variable PEP517_SOURCE_PATH to set where the file is.

In the future there should be a pep517.bbclass to centralise the common
logic, but for now this can be defined in each of the relevant classes.

[1] https://www.python.org/dev/peps/pep-0517/

(From OE-Core rev: f85b512e2ad39ec32f11f9b25b8c92bea20c844d)

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
Ross Burton
d2655729bc flit_core: respect PIP_INSTALL_DIST_PATH
pip_install_wheel expects the wheels to be in PIP_INSTALL_DIST_PATH but
this class was writing to the same directory through chance not design.

Respect PIP_INSTALL_DIST_PATH as the output directory, and use
[cleandirs] to ensure that it exists and is empty.

Also call the flit_core.wheel module directly as this is a public entry
point to the wheel building logic.

(From OE-Core rev: a3d9eb8051bc2effb8130b1743ba251c1fe7c525)

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
Ross Burton
025fa5266e flit_core: clean up configure/compile
Make do_configure do nothing by default as the base configure isn't
useful, and invoke the build API directly instead of writing a script.

In the future, this can simply call python3-build.

(From OE-Core rev: 2d80529a486d25ad96c448499392547e82779de4)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-03-08 09:44:28 +00:00
Tim Orling
fb0814a57b flit_core: export do_configure and do_compile
The class should export the tasks so they can be extended or overriden
elsewhere (like what setuptools3.bbclass has).

(From OE-Core rev: 14c2dcbebccf072225a089518ffeb010401f479c)

Signed-off-by: Tim Orling <tim.orling@konsulko.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-03-02 18:43:24 +00:00
Tim Orling
596bc1658e flit_core: inherit setuptools3-base
This helps bridge the old setuptools3 behavior.

FILES:${PN} has sane defaults in setuptools3-base

(From OE-Core rev: b1bb4e2d73985c6e8cf03b0fea94e8b739648cf7)

Signed-off-by: Tim Orling <tim.orling@konsulko.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2022-02-27 12:34:40 +00:00
Tim Orling
29d6a3ae34 flit_core.bbclass: add helper for newer python packaging
Some python packages now use pyproject.toml and declare
flit_core.buildapi as the build engine

Use pip_install_wheel class to install.

[YOCTO #14638]

(From OE-Core rev: f0292098dc5afc62e0cd91d475edeb1784700795)

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