Skip to contentSkip to conversation

Add python3-hatchling (from meta-oe)

PATCH In review Ross Burton 2 participants 7 messages Jun 19, 2022 – Jun 20, 2022

lore
Share & tools
lore
#0 lore raw

PATCH 1/3 Add python3-hatchling (from meta-oe)

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.

---
 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
meta/classes/python_hatchling.bbclass new file +5 -0
new file mode 100644
index 00000000000..b3cbe23601b
@@ -0,0 +1,5 @@
+inherit python_pep517 python3native python3-dir setuptools3-base
+
+DEPENDS += "python3-hatchling-native"
+
+PEP517_BUILD_API = "hatchling.build"
meta/conf/distro/include/maintainers.inc +1 -0
index 6ab2ed9a9f5..c6ad3ac678c 100644
@@ -611,6 +611,7 @@ RECIPE_MAINTAINER:pn-python3-extras = "Oleksandr Kravchuk <open.source@oleksandr
 RECIPE_MAINTAINER:pn-python3-flit-core = "Tim Orling <[email protected]>"
 RECIPE_MAINTAINER:pn-python3-git = "Oleksandr Kravchuk <[email protected]>"
 RECIPE_MAINTAINER:pn-python3-gitdb = "Oleksandr Kravchuk <[email protected]>"
+RECIPE_MAINTAINER:pn-python3-hatchling = "Ross Burton <[email protected]>"
 RECIPE_MAINTAINER:pn-python3-hypothesis = "Tim Orling <[email protected]>"
 RECIPE_MAINTAINER:pn-python3-idna = "Bruce Ashfield <[email protected]>"
 RECIPE_MAINTAINER:pn-python3-imagesize = "Tim Orling <[email protected]>"
meta/recipes-devtools/python/python3-hatchling_1.3.0.bb new file +21 -0
new file mode 100644
index 00000000000..6e7ccd743f5
@@ -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"
Signature · 1 line
2.25.1
#1 lore raw

PATCH 2/3 python3-hatch-vcs: add new recipe

This recipe (a VCS plugin for Hatch) is needed by the new python3-jsonschema to build.

---
 meta/conf/distro/include/maintainers.inc             |  1 +
 .../python/python3-hatch-vcs_0.2.0.bb                | 12 ++++++++++++
 2 files changed, 13 insertions(+)
 create mode 100644 meta/recipes-devtools/python/python3-hatch-vcs_0.2.0.bb
meta/conf/distro/include/maintainers.inc +1 -0
index c6ad3ac678c..a3394a823cb 100644
@@ -612,6 +612,7 @@ RECIPE_MAINTAINER:pn-python3-flit-core = "Tim Orling <[email protected]>"
 RECIPE_MAINTAINER:pn-python3-git = "Oleksandr Kravchuk <[email protected]>"
 RECIPE_MAINTAINER:pn-python3-gitdb = "Oleksandr Kravchuk <[email protected]>"
 RECIPE_MAINTAINER:pn-python3-hatchling = "Ross Burton <[email protected]>"
+RECIPE_MAINTAINER:pn-python3-hatch-vcs = "Ross Burton <[email protected]>"
 RECIPE_MAINTAINER:pn-python3-hypothesis = "Tim Orling <[email protected]>"
 RECIPE_MAINTAINER:pn-python3-idna = "Bruce Ashfield <[email protected]>"
 RECIPE_MAINTAINER:pn-python3-imagesize = "Tim Orling <[email protected]>"
meta/recipes-devtools/python/python3-hatch-vcs_0.2.0.bb new file +12 -0
new file mode 100644
index 00000000000..100099c130c
@@ -0,0 +1,12 @@
+SUMMARY = "Hatch plugin for versioning with your preferred VCS"
+HOMEPAGE = "https://pypi.org/project/hatch-vcs/"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=26501cfd0bbddf830ee820e95551fa3d"
+
+inherit pypi python_hatchling
+
+PYPI_PACKAGE = "hatch_vcs"
+
+SRC_URI[sha256sum] = "9913d733b34eec9bb0345d0626ca32165a4ad2de15d1ce643c36d09ca908abff"
+
+BBCLASSEXTEND = "native nativesdk"
Signature · 1 line
2.25.1
#2 lore raw

PATCH 3/3 python3-jsonschema: upgrade 4.5.1 -> 4.6.0

In reply to Ross Burton

Switch the build system from setuptools to hatch.

---
 ...hon3-jsonschema_4.5.1.bb => python3-jsonschema_4.6.0.bb} | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
 rename meta/recipes-devtools/python/{python3-jsonschema_4.5.1.bb => python3-jsonschema_4.6.0.bb} (84%)
meta/recipes-devtools/python/python3-jsonschema_4.6.0.bb renamed from meta/recipes-devtools/python/python3-jsonschema_4.5.1.bb +3 -3
similarity index 84%
rename from meta/recipes-devtools/python/python3-jsonschema_4.5.1.bb
rename to meta/recipes-devtools/python/python3-jsonschema_4.6.0.bb
index 9f8719870c2..edd7fafc77d 100644
@@ -4,11 +4,11 @@ LICENSE = "MIT"
 LIC_FILES_CHKSUM = "file://COPYING;md5=7a60a81c146ec25599a3e1dabb8610a8 \
                     file://json/LICENSE;md5=9d4de43111d33570c8fe49b4cb0e01af"
 
-SRC_URI[sha256sum] = "7c6d882619340c3347a1bf7315e147e6d3dae439033ae6383d6acb908c101dfc"
+SRC_URI[sha256sum] = "9d6397ba4a6c0bf0300736057f649e3e12ecbc07d3e81a0dacb72de4e9801957"
 
-inherit pypi python_setuptools_build_meta
+inherit pypi python_hatchling
 
-DEPENDS += "${PYTHON_PN}-vcversioner-native ${PYTHON_PN}-setuptools-scm-native"
+DEPENDS += "${PYTHON_PN}-hatch-vcs-native"
 
 PACKAGECONFIG ??= "format"
 PACKAGECONFIG[format] = ",,,\
Signature · 1 line
2.25.1
#3 lore raw
In reply to Ross Burton

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

Quoted 76 lines · Ross Burton via lists.openembedded.org

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.

---

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

meta/classes/python_hatchling.bbclass new file +5 -0
new file mode 100644
index 00000000000..b3cbe23601b
@@ -0,0 +1,5 @@
+inherit python_pep517 python3native python3-dir setuptools3-base
+
+DEPENDS += "python3-hatchling-native"
+
+PEP517_BUILD_API = "hatchling.build"
meta/conf/distro/include/maintainers.inc +0 -0
index 6ab2ed9a9f5..c6ad3ac678c 100644
@@ -611,6 +611,7 @@ RECIPE_MAINTAINER:pn-python3-extras = "Oleksandr Kravchuk <open.source@oleksandr

RECIPE_MAINTAINER:pn-python3-flit-core = "Tim Orling <[email protected]>" RECIPE_MAINTAINER:pn-python3-git = "Oleksandr Kravchuk <[email protected]>" RECIPE_MAINTAINER:pn-python3-gitdb = "Oleksandr Kravchuk <[email protected]>" +RECIPE_MAINTAINER:pn-python3-hatchling = "Ross Burton <[email protected]>" RECIPE_MAINTAINER:pn-python3-hypothesis = "Tim Orling <[email protected]>" RECIPE_MAINTAINER:pn-python3-idna = "Bruce Ashfield <[email protected]>" RECIPE_MAINTAINER:pn-python3-imagesize = "Tim Orling <[email protected]>"

meta/recipes-devtools/python/python3-hatchling_1.3.0.bb new file +21 -0
new file mode 100644
index 00000000000..6e7ccd743f5
@@ -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"
Signature · 10 lines
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: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-
#4 lore raw
In reply to Ross Burton

Hi Ross,

Quoted 4 lines · On Sun, 19 Jun 2022 22:25:18 +0100 "Ross Burton" <[email protected]> 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.

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:

Signature · 3 lines
Luca Ceresoli, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#5 lore raw

Hi,

Quoted 5 lines · On Mon, 20 Jun 2022 14:48:32 +0200 Luca Ceresoli <[email protected]>…

Hi Ross,

On Sun, 19 Jun 2022 22:25:18 +0100
"Ross Burton" <[email protected]> wrote:

Quoted 8 lines
Quoted 4 lines

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.

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

Signature · 3 lines
Luca Ceresoli, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
#6 lore raw

Sorry, failed to remove meta-python before running final tests.

V2 incoming.

Ross

From: Luca Ceresoli <[email protected]>
Date: Monday, 20 June 2022 at 13:53
To: Ross Burton <[email protected]>
Cc: [email protected] <[email protected]>, nd <[email protected]>
Subject: Re: [OE-core] [PATCH 1/3] Add python3-hatchling (from meta-oe)
Hi,

Quoted 5 lines · On Mon, 20 Jun 2022 14:48:32 +0200 Luca Ceresoli <[email protected]>…

Hi Ross,

On Sun, 19 Jun 2022 22:25:18 +0100
"Ross Burton" <[email protected]> wrote:

Quoted 8 lines
Quoted 4 lines

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.

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