diff options
| -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 | ||
