python3-hatchling: add new recipe and build class

Hatchling is the build backend used by the Hatch tool.  Add the recipe
and a pep517 build class.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
Ross Burton 2022-05-24 13:11:51 +01:00 committed by Khem Raj
parent 07c2e3273c
commit 4aebf7e4b2
3 changed files with 27 additions and 0 deletions

View File

@ -0,0 +1,5 @@
inherit python_pep517 python3native python3-dir setuptools3-base
DEPENDS += "python3-hatchling-native"
PEP517_BUILD_API = "hatchling.build"

View File

@ -167,6 +167,7 @@ RDEPENDS:packagegroup-meta-python3 = "\
python3-h11 \
python3-h2 \
python3-h5py \
python3-hatchling \
python3-haversine \
python3-hpack \
python3-html2text \

View File

@ -0,0 +1,21 @@
SUMMARY = "The extensible, standards compliant build backend used by Hatch"
HOMEPAGE = "https://hatch.pypa.io/latest/"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=cbe2fd33fc9297692812fc94b7d27fd9"
inherit pypi python_hatchling
DEPENDS += "python3-pluggy-native python3-tomli-native python3-pathspec-native python3-packaging-native python3-editables-native"
DEPENDS:remove:class-native = "python3-hatchling-native"
SRC_URI[sha256sum] = "1401d45d3dd6a5910f64d539acaa943486d5e8b7dda1a97f2b0040fdddc5b85e"
# Until we have a proper tool to invoke PEP517 builds, hatchling can't
# bootstrap itself automatically.
PEP517_BUILD_API = "hatchling.ouroboros"
do_compile:prepend() {
export PYTHONPATH=src
}
BBCLASSEXTEND = "native nativesdk"