[5/7] python3-hatchling: add new recipe and build class

Message ID 20220524121153.1175133-5-ross.burton@arm.com
State Under Review
Headers show
Series [1/7] python3-setuptools-scm-git-archive: add new recipe | expand

Commit Message

Ross Burton May 24, 2022, 12:11 p.m. UTC
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>
---
 meta-python/classes/python_hatchling.bbclass  |  5 +++++
 .../packagegroups/packagegroup-meta-python.bb |  1 +
 .../python/python3-hatchling_1.3.0.bb         | 21 +++++++++++++++++++
 3 files changed, 27 insertions(+)
 create mode 100644 meta-python/classes/python_hatchling.bbclass
 create mode 100644 meta-python/recipes-devtools/python/python3-hatchling_1.3.0.bb

Comments

Khem Raj May 24, 2022, 8:32 p.m. UTC | #1
Its failing YP compat checks see

https://autobuilder.yoctoproject.org/typhoon/#/builders/88/builds/1778

On Tue, May 24, 2022 at 5:12 AM Ross Burton <ross.burton@arm.com> wrote:
>
> 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>
> ---
>  meta-python/classes/python_hatchling.bbclass  |  5 +++++
>  .../packagegroups/packagegroup-meta-python.bb |  1 +
>  .../python/python3-hatchling_1.3.0.bb         | 21 +++++++++++++++++++
>  3 files changed, 27 insertions(+)
>  create mode 100644 meta-python/classes/python_hatchling.bbclass
>  create mode 100644 meta-python/recipes-devtools/python/python3-hatchling_1.3.0.bb
>
> diff --git a/meta-python/classes/python_hatchling.bbclass b/meta-python/classes/python_hatchling.bbclass
> new file mode 100644
> index 0000000000..b3cbe23601
> --- /dev/null
> +++ b/meta-python/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-python/recipes-core/packagegroups/packagegroup-meta-python.bb b/meta-python/recipes-core/packagegroups/packagegroup-meta-python.bb
> index 2fcf34260c..80ec0720fd 100644
> --- a/meta-python/recipes-core/packagegroups/packagegroup-meta-python.bb
> +++ b/meta-python/recipes-core/packagegroups/packagegroup-meta-python.bb
> @@ -168,6 +168,7 @@ RDEPENDS:packagegroup-meta-python3 = "\
>      python3-h11 \
>      python3-h2 \
>      python3-h5py \
> +    python3-hatchling \
>      python3-haversine \
>      python3-hpack \
>      python3-html2text \
> diff --git a/meta-python/recipes-devtools/python/python3-hatchling_1.3.0.bb b/meta-python/recipes-devtools/python/python3-hatchling_1.3.0.bb
> new file mode 100644
> index 0000000000..a6550a9732
> --- /dev/null
> +++ b/meta-python/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/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"
> --
> 2.25.1
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#97246): https://lists.openembedded.org/g/openembedded-devel/message/97246
> Mute This Topic: https://lists.openembedded.org/mt/91309500/1997914
> Group Owner: openembedded-devel+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [raj.khem@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
Ross Burton May 25, 2022, 10:37 a.m. UTC | #2
Sorry, forgot to say that this series depends on a patch I’ve sent for oe-core (to add pluggy-native).

Ross

> On 24 May 2022, at 21:32, Khem Raj <raj.khem@gmail.com> wrote:
> 
> Its failing YP compat checks see
> 
> https://autobuilder.yoctoproject.org/typhoon/#/builders/88/builds/1778
> 
> On Tue, May 24, 2022 at 5:12 AM Ross Burton <ross.burton@arm.com> wrote:
>> 
>> 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>
>> ---
>> meta-python/classes/python_hatchling.bbclass  |  5 +++++
>> .../packagegroups/packagegroup-meta-python.bb |  1 +
>> .../python/python3-hatchling_1.3.0.bb         | 21 +++++++++++++++++++
>> 3 files changed, 27 insertions(+)
>> create mode 100644 meta-python/classes/python_hatchling.bbclass
>> create mode 100644 meta-python/recipes-devtools/python/python3-hatchling_1.3.0.bb
>> 
>> diff --git a/meta-python/classes/python_hatchling.bbclass b/meta-python/classes/python_hatchling.bbclass
>> new file mode 100644
>> index 0000000000..b3cbe23601
>> --- /dev/null
>> +++ b/meta-python/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-python/recipes-core/packagegroups/packagegroup-meta-python.bb b/meta-python/recipes-core/packagegroups/packagegroup-meta-python.bb
>> index 2fcf34260c..80ec0720fd 100644
>> --- a/meta-python/recipes-core/packagegroups/packagegroup-meta-python.bb
>> +++ b/meta-python/recipes-core/packagegroups/packagegroup-meta-python.bb
>> @@ -168,6 +168,7 @@ RDEPENDS:packagegroup-meta-python3 = "\
>>     python3-h11 \
>>     python3-h2 \
>>     python3-h5py \
>> +    python3-hatchling \
>>     python3-haversine \
>>     python3-hpack \
>>     python3-html2text \
>> diff --git a/meta-python/recipes-devtools/python/python3-hatchling_1.3.0.bb b/meta-python/recipes-devtools/python/python3-hatchling_1.3.0.bb
>> new file mode 100644
>> index 0000000000..a6550a9732
>> --- /dev/null
>> +++ b/meta-python/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/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"
>> --
>> 2.25.1
>> 
>> 
>> -=-=-=-=-=-=-=-=-=-=-=-
>> Links: You receive all messages sent to this group.
>> View/Reply Online (#97246): https://lists.openembedded.org/g/openembedded-devel/message/97246
>> Mute This Topic: https://lists.openembedded.org/mt/91309500/1997914
>> Group Owner: openembedded-devel+owner@lists.openembedded.org
>> Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [raj.khem@gmail.com]
>> -=-=-=-=-=-=-=-=-=-=-=-
Khem Raj May 25, 2022, 3:08 p.m. UTC | #3
On Wed, May 25, 2022 at 3:37 AM Ross Burton <Ross.Burton@arm.com> wrote:
>
> Sorry, forgot to say that this series depends on a patch I’ve sent for oe-core (to add pluggy-native).
>

yeah figured

> Ross
>
> > On 24 May 2022, at 21:32, Khem Raj <raj.khem@gmail.com> wrote:
> >
> > Its failing YP compat checks see
> >
> > https://autobuilder.yoctoproject.org/typhoon/#/builders/88/builds/1778
> >
> > On Tue, May 24, 2022 at 5:12 AM Ross Burton <ross.burton@arm.com> wrote:
> >>
> >> 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>
> >> ---
> >> meta-python/classes/python_hatchling.bbclass  |  5 +++++
> >> .../packagegroups/packagegroup-meta-python.bb |  1 +
> >> .../python/python3-hatchling_1.3.0.bb         | 21 +++++++++++++++++++
> >> 3 files changed, 27 insertions(+)
> >> create mode 100644 meta-python/classes/python_hatchling.bbclass
> >> create mode 100644 meta-python/recipes-devtools/python/python3-hatchling_1.3.0.bb
> >>
> >> diff --git a/meta-python/classes/python_hatchling.bbclass b/meta-python/classes/python_hatchling.bbclass
> >> new file mode 100644
> >> index 0000000000..b3cbe23601
> >> --- /dev/null
> >> +++ b/meta-python/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-python/recipes-core/packagegroups/packagegroup-meta-python.bb b/meta-python/recipes-core/packagegroups/packagegroup-meta-python.bb
> >> index 2fcf34260c..80ec0720fd 100644
> >> --- a/meta-python/recipes-core/packagegroups/packagegroup-meta-python.bb
> >> +++ b/meta-python/recipes-core/packagegroups/packagegroup-meta-python.bb
> >> @@ -168,6 +168,7 @@ RDEPENDS:packagegroup-meta-python3 = "\
> >>     python3-h11 \
> >>     python3-h2 \
> >>     python3-h5py \
> >> +    python3-hatchling \
> >>     python3-haversine \
> >>     python3-hpack \
> >>     python3-html2text \
> >> diff --git a/meta-python/recipes-devtools/python/python3-hatchling_1.3.0.bb b/meta-python/recipes-devtools/python/python3-hatchling_1.3.0.bb
> >> new file mode 100644
> >> index 0000000000..a6550a9732
> >> --- /dev/null
> >> +++ b/meta-python/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/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"
> >> --
> >> 2.25.1
> >>
> >>
> >> -=-=-=-=-=-=-=-=-=-=-=-
> >> Links: You receive all messages sent to this group.
> >> View/Reply Online (#97246): https://lists.openembedded.org/g/openembedded-devel/message/97246
> >> Mute This Topic: https://lists.openembedded.org/mt/91309500/1997914
> >> Group Owner: openembedded-devel+owner@lists.openembedded.org
> >> Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [raj.khem@gmail.com]
> >> -=-=-=-=-=-=-=-=-=-=-=-
>

Patch

diff --git a/meta-python/classes/python_hatchling.bbclass b/meta-python/classes/python_hatchling.bbclass
new file mode 100644
index 0000000000..b3cbe23601
--- /dev/null
+++ b/meta-python/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-python/recipes-core/packagegroups/packagegroup-meta-python.bb b/meta-python/recipes-core/packagegroups/packagegroup-meta-python.bb
index 2fcf34260c..80ec0720fd 100644
--- a/meta-python/recipes-core/packagegroups/packagegroup-meta-python.bb
+++ b/meta-python/recipes-core/packagegroups/packagegroup-meta-python.bb
@@ -168,6 +168,7 @@  RDEPENDS:packagegroup-meta-python3 = "\
     python3-h11 \
     python3-h2 \
     python3-h5py \
+    python3-hatchling \
     python3-haversine \
     python3-hpack \
     python3-html2text \
diff --git a/meta-python/recipes-devtools/python/python3-hatchling_1.3.0.bb b/meta-python/recipes-devtools/python/python3-hatchling_1.3.0.bb
new file mode 100644
index 0000000000..a6550a9732
--- /dev/null
+++ b/meta-python/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/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"