summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoss Burton <ross@burtonini.com>2022-03-08 14:30:34 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-03-09 11:46:28 +0000
commitc7054e363aa34e2c1a04c1c7de08d9a2068f5794 (patch)
tree7248ff98e7df38e04bea4809c953857ceb442425
parent37527ea5bd0e7a7e7e7c6a69548f1f66cf964ddc (diff)
downloadpoky-c7054e363aa34e2c1a04c1c7de08d9a2068f5794.tar.gz
setuptools_build_meta: 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: 891fab83683cf032d4849f2dfbcd03a3eb22f158) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/classes/setuptools_build_meta.bbclass4
1 files changed, 4 insertions, 0 deletions
diff --git a/meta/classes/setuptools_build_meta.bbclass b/meta/classes/setuptools_build_meta.bbclass
index 18ae2e6004..787fbd5f36 100644
--- a/meta/classes/setuptools_build_meta.bbclass
+++ b/meta/classes/setuptools_build_meta.bbclass
@@ -2,12 +2,16 @@ inherit pip_install_wheel setuptools3-base
2 2
3DEPENDS += "python3-setuptools-native python3-wheel-native" 3DEPENDS += "python3-setuptools-native python3-wheel-native"
4 4
5# Where to execute the build process from
6PEP517_SOURCE_PATH ?= "${S}"
7
5setuptools_build_meta_do_configure () { 8setuptools_build_meta_do_configure () {
6 : 9 :
7} 10}
8 11
9# TODO: ideally this uses pypa/build 12# TODO: ideally this uses pypa/build
10setuptools_build_meta_do_compile () { 13setuptools_build_meta_do_compile () {
14 cd ${PEP517_SOURCE_PATH}
11 nativepython3 -c "from setuptools import build_meta; build_meta.build_wheel('${PIP_INSTALL_DIST_PATH}')" 15 nativepython3 -c "from setuptools import build_meta; build_meta.build_wheel('${PIP_INSTALL_DIST_PATH}')"
12} 16}
13do_compile[cleandirs] += "${PIP_INSTALL_DIST_PATH}" 17do_compile[cleandirs] += "${PIP_INSTALL_DIST_PATH}"