diff options
| author | Tim Orling <ticotimo@gmail.com> | 2022-02-22 11:16:32 -0800 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-02-25 15:07:50 +0000 |
| commit | 74e5fc20c05b3f6b406dbd0b3792a6afa5f3fdab (patch) | |
| tree | 4bdb6753fb27b74bd846924bc8e755aa96163f2a /meta | |
| parent | ae5f41531160aad73fba5ee01cb580c812546437 (diff) | |
| download | poky-74e5fc20c05b3f6b406dbd0b3792a6afa5f3fdab.tar.gz | |
setuptools_build_meta.bbclass: add helper class
This class uses the PEP 517 compliant setuptools.buil_meta to build
wheels.
[YOCTO #14638]
(From OE-Core rev: b8f25c75f152683de4fa6c176118583d3dea894d)
Signed-off-by: Tim Orling <tim.orling@konsulko.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
| -rw-r--r-- | meta/classes/setuptools_build_meta.bbclass | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/meta/classes/setuptools_build_meta.bbclass b/meta/classes/setuptools_build_meta.bbclass new file mode 100644 index 0000000000..b1441e65dd --- /dev/null +++ b/meta/classes/setuptools_build_meta.bbclass | |||
| @@ -0,0 +1,18 @@ | |||
| 1 | inherit pip_install_wheel setuptools3-base | ||
| 2 | |||
| 3 | DEPENDS += "python3 python3-setuptools-native python3-wheel-native" | ||
| 4 | |||
| 5 | setuptools_build_meta_do_configure () { | ||
| 6 | mkdir -p ${S}/dist | ||
| 7 | cat > ${S}/build-it.py << EOF | ||
| 8 | from setuptools import build_meta | ||
| 9 | wheel = build_meta.build_wheel('./dist') | ||
| 10 | print(wheel) | ||
| 11 | EOF | ||
| 12 | } | ||
| 13 | |||
| 14 | setuptools_build_meta_do_compile () { | ||
| 15 | nativepython3 ${S}/build-it.py | ||
| 16 | } | ||
| 17 | |||
| 18 | EXPORT_FUNCTIONS do_configure do_compile | ||
