Skip to content

Commit

Permalink
Add python3-hatchling (from meta-oe)
Browse files Browse the repository at this point in the history
Recipes in core are now needing to use the Hatch build system, so
move the hatchling recipe and class from meta-oe to oe-core.

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
  • Loading branch information
rossburton authored and rpurdie committed Jun 22, 2022
1 parent 857f324 commit 846e806
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 0 deletions.
5 changes: 5 additions & 0 deletions meta/classes/python_hatchling.bbclass
@@ -0,0 +1,5 @@
inherit python_pep517 python3native python3-dir setuptools3-base

DEPENDS += "python3-hatchling-native"

PEP517_BUILD_API = "hatchling.build"
1 change: 1 addition & 0 deletions meta/conf/distro/include/maintainers.inc
Expand Up @@ -612,6 +612,7 @@ RECIPE_MAINTAINER:pn-python3-extras = "Oleksandr Kravchuk <open.source@oleksandr
RECIPE_MAINTAINER:pn-python3-flit-core = "Tim Orling <tim.orling@konsulko.com>"
RECIPE_MAINTAINER:pn-python3-git = "Oleksandr Kravchuk <open.source@oleksandr-kravchuk.com>"
RECIPE_MAINTAINER:pn-python3-gitdb = "Oleksandr Kravchuk <open.source@oleksandr-kravchuk.com>"
RECIPE_MAINTAINER:pn-python3-hatchling = "Ross Burton <ross.burton@arm.com>"
RECIPE_MAINTAINER:pn-python3-hypothesis = "Tim Orling <tim.orling@konsulko.com>"
RECIPE_MAINTAINER:pn-python3-idna = "Bruce Ashfield <bruce.ashfield@gmail.com>"
RECIPE_MAINTAINER:pn-python3-imagesize = "Tim Orling <tim.orling@konsulko.com>"
Expand Down
21 changes: 21 additions & 0 deletions meta/recipes-devtools/python/python3-hatchling_1.3.0.bb
@@ -0,0 +1,21 @@
SUMMARY = "The extensible, standards compliant build backend used by Hatch"
HOMEPAGE = "https://hatch.pypa.io/"
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"

0 comments on commit 846e806

Please sign in to comment.