diff options
author | Ross Burton <ross@burtonini.com> | 2022-03-08 14:30:33 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-03-09 11:46:28 +0000 |
commit | 2df212ff6cc5307a49205beefa4b0dac5edff446 (patch) | |
tree | f4a34e7f521bd865f8119cf7569be25a73b73598 /meta/classes | |
parent | d2655729bc87a07c2e26222ca3a4e0cf8f6b3b6c (diff) | |
download | poky-2df212ff6cc5307a49205beefa4b0dac5edff446.tar.gz |
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>
Diffstat (limited to 'meta/classes')
-rw-r--r-- | meta/classes/flit_core.bbclass | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/meta/classes/flit_core.bbclass b/meta/classes/flit_core.bbclass index 3481bb5089..7b578967a9 100644 --- a/meta/classes/flit_core.bbclass +++ b/meta/classes/flit_core.bbclass | |||
@@ -6,8 +6,12 @@ flit_core_do_configure () { | |||
6 | : | 6 | : |
7 | } | 7 | } |
8 | 8 | ||
9 | # Where to execute the build process from | ||
10 | PEP517_SOURCE_PATH ?= "${S}" | ||
11 | |||
9 | # TODO: ideally this uses pypa/build | 12 | # TODO: ideally this uses pypa/build |
10 | flit_core_do_compile () { | 13 | flit_core_do_compile () { |
14 | cd ${PEP517_SOURCE_PATH} | ||
11 | nativepython3 -mflit_core.wheel --outdir ${PIP_INSTALL_DIST_PATH} | 15 | nativepython3 -mflit_core.wheel --outdir ${PIP_INSTALL_DIST_PATH} |
12 | } | 16 | } |
13 | do_compile[cleandirs] += "${PIP_INSTALL_DIST_PATH}" | 17 | do_compile[cleandirs] += "${PIP_INSTALL_DIST_PATH}" |