Message ID | 20220619212520.4158865-1-ross.burton@arm.com |
---|---|
State | Accepted, archived |
Commit | 846e806181f1349be29cbce78c5041735dfd7e6f |
Headers | show |
Series | [1/3] Add python3-hatchling (from meta-oe) | expand |
An open question: should the class be called python_hatchling or python_hatch? The front-end tool is called Hatch, but the underlying build API is called Hatchling. I’m thinking we should rename the class to _hatch as part of the move to oe-core. Ross > On 19 Jun 2022, at 22:25, Ross Burton via lists.openembedded.org <ross.burton=arm.com@lists.openembedded.org> wrote: > > 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> > --- > meta/classes/python_hatchling.bbclass | 5 +++++ > meta/conf/distro/include/maintainers.inc | 1 + > .../python/python3-hatchling_1.3.0.bb | 21 +++++++++++++++++++ > 3 files changed, 27 insertions(+) > create mode 100644 meta/classes/python_hatchling.bbclass > create mode 100644 meta/recipes-devtools/python/python3-hatchling_1.3.0.bb > > diff --git a/meta/classes/python_hatchling.bbclass b/meta/classes/python_hatchling.bbclass > new file mode 100644 > index 00000000000..b3cbe23601b > --- /dev/null > +++ b/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" > diff --git a/meta/conf/distro/include/maintainers.inc b/meta/conf/distro/include/maintainers.inc > index 6ab2ed9a9f5..c6ad3ac678c 100644 > --- a/meta/conf/distro/include/maintainers.inc > +++ b/meta/conf/distro/include/maintainers.inc > @@ -611,6 +611,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>" > diff --git a/meta/recipes-devtools/python/python3-hatchling_1.3.0.bb b/meta/recipes-devtools/python/python3-hatchling_1.3.0.bb > new file mode 100644 > index 00000000000..6e7ccd743f5 > --- /dev/null > +++ b/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" > -- > 2.25.1 > > > -=-=-=-=-=-=-=-=-=-=-=- > Links: You receive all messages sent to this group. > View/Reply Online (#167075): https://lists.openembedded.org/g/openembedded-core/message/167075 > Mute This Topic: https://lists.openembedded.org/mt/91865501/6875888 > Group Owner: openembedded-core+owner@lists.openembedded.org > Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [ross.burton@arm.com] > -=-=-=-=-=-=-=-=-=-=-=- >
Hi Ross, On Sun, 19 Jun 2022 22:25:18 +0100 "Ross Burton" <ross.burton@arm.com> wrote: > 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> This patch is causing failures on the autobuilders: ERROR: Nothing PROVIDES 'python3-pathspec-native' (but .../python3-hatchling_1.3.0.bb DEPENDS on or otherwise requires it). Close matches:
Hi, On Mon, 20 Jun 2022 14:48:32 +0200 Luca Ceresoli <luca.ceresoli@bootlin.com> wrote: > Hi Ross, > > On Sun, 19 Jun 2022 22:25:18 +0100 > "Ross Burton" <ross.burton@arm.com> wrote: > > > 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> > > This patch is causing failures on the autobuilders: > > ERROR: Nothing PROVIDES 'python3-pathspec-native' (but .../python3-hatchling_1.3.0.bb DEPENDS on or otherwise requires it). Close matches: References: https://autobuilder.yoctoproject.org/typhoon/#/builders/39/builds/5402/steps/18/logs/stdio https://autobuilder.yoctoproject.org/typhoon/#/builders/39/builds/5402/steps/16/logs/stdio
Sorry, failed to remove meta-python before running final tests. V2 incoming. Ross From: Luca Ceresoli <luca.ceresoli@bootlin.com> Date: Monday, 20 June 2022 at 13:53 To: Ross Burton <Ross.Burton@arm.com> Cc: openembedded-core@lists.openembedded.org <openembedded-core@lists.openembedded.org>, nd <nd@arm.com> Subject: Re: [OE-core] [PATCH 1/3] Add python3-hatchling (from meta-oe) Hi, On Mon, 20 Jun 2022 14:48:32 +0200 Luca Ceresoli <luca.ceresoli@bootlin.com> wrote: > Hi Ross, > > On Sun, 19 Jun 2022 22:25:18 +0100 > "Ross Burton" <ross.burton@arm.com> wrote: > > > 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> > > This patch is causing failures on the autobuilders: > > ERROR: Nothing PROVIDES 'python3-pathspec-native' (but .../python3-hatchling_1.3.0.bb DEPENDS on or otherwise requires it). Close matches: References: https://autobuilder.yoctoproject.org/typhoon/#/builders/39/builds/5402/steps/18/logs/stdio https://autobuilder.yoctoproject.org/typhoon/#/builders/39/builds/5402/steps/16/logs/stdio -- Luca Ceresoli, Bootlin Embedded Linux and Kernel engineering https://bootlin.com
diff --git a/meta/classes/python_hatchling.bbclass b/meta/classes/python_hatchling.bbclass new file mode 100644 index 00000000000..b3cbe23601b --- /dev/null +++ b/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" diff --git a/meta/conf/distro/include/maintainers.inc b/meta/conf/distro/include/maintainers.inc index 6ab2ed9a9f5..c6ad3ac678c 100644 --- a/meta/conf/distro/include/maintainers.inc +++ b/meta/conf/distro/include/maintainers.inc @@ -611,6 +611,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>" diff --git a/meta/recipes-devtools/python/python3-hatchling_1.3.0.bb b/meta/recipes-devtools/python/python3-hatchling_1.3.0.bb new file mode 100644 index 00000000000..6e7ccd743f5 --- /dev/null +++ b/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"
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> --- meta/classes/python_hatchling.bbclass | 5 +++++ meta/conf/distro/include/maintainers.inc | 1 + .../python/python3-hatchling_1.3.0.bb | 21 +++++++++++++++++++ 3 files changed, 27 insertions(+) create mode 100644 meta/classes/python_hatchling.bbclass create mode 100644 meta/recipes-devtools/python/python3-hatchling_1.3.0.bb