openembedded-core.lists.openembedded.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] python3-pyproject-metadata: New recipe
@ 2023-06-02  7:44 Zoltán Böszörményi
  2023-06-02  7:44 ` [PATCH 2/3] python3-meson-python: " Zoltán Böszörményi
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Zoltán Böszörményi @ 2023-06-02  7:44 UTC (permalink / raw)
  To: openembedded-core
  Cc: Alexander Kanavin, Alexandre Belloni,
	Zoltán Böszörményi

It is a dependency for python3-meson-python.

Signed-off-by: Zoltán Böszörményi <zboszor@gmail.com>
---
 meta/conf/distro/include/maintainers.inc         |  1 +
 .../python/python3-pyproject-metadata_0.7.1.bb   | 16 ++++++++++++++++
 2 files changed, 17 insertions(+)
 create mode 100644 meta/recipes-devtools/python/python3-pyproject-metadata_0.7.1.bb

diff --git a/meta/conf/distro/include/maintainers.inc b/meta/conf/distro/include/maintainers.inc
index 5accca3fef..d910ce6481 100644
--- a/meta/conf/distro/include/maintainers.inc
+++ b/meta/conf/distro/include/maintainers.inc
@@ -670,6 +670,7 @@ RECIPE_MAINTAINER:pn-python3-pygobject = "Zang Ruochen <zangruochen@loongson.cn>
 RECIPE_MAINTAINER:pn-python3-pyopenssl = "Tim Orling <tim.orling@konsulko.com>"
 RECIPE_MAINTAINER:pn-python3-pyparsing = "Oleksandr Kravchuk <open.source@oleksandr-kravchuk.com>"
 RECIPE_MAINTAINER:pn-python3-pyproject-hooks = "Ross Burton <ross.burton@arm.com>"
+RECIPE_MAINTAINER:pn-python3-pyproject-metadata = "Zoltán Böszörményi <zboszor@gmail.com>"
 RECIPE_MAINTAINER:pn-python3-pysocks = "Tim Orling <tim.orling@konsulko.com>"
 RECIPE_MAINTAINER:pn-python3-pytest = "Tim Orling <tim.orling@konsulko.com>"
 RECIPE_MAINTAINER:pn-python3-pytest-runner = "Tim Orling <tim.orling@konsulko.com>"
diff --git a/meta/recipes-devtools/python/python3-pyproject-metadata_0.7.1.bb b/meta/recipes-devtools/python/python3-pyproject-metadata_0.7.1.bb
new file mode 100644
index 0000000000..9887af78d0
--- /dev/null
+++ b/meta/recipes-devtools/python/python3-pyproject-metadata_0.7.1.bb
@@ -0,0 +1,16 @@
+SUMMARY = "PEP 621 metadata parsing"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=310439af287b0fb4780b2ad6907c256c"
+
+PYPI_PACKAGE = "pyproject-metadata"
+
+inherit pypi python_setuptools_build_meta
+SRC_URI[sha256sum] = "0a94f18b108b9b21f3a26a3d541f056c34edcb17dc872a144a15618fed7aef67"
+
+BBCLASSEXTEND = "native nativesdk"
+
+RDEPENDS:${PN} += " \
+    python3-logging \
+    python3-packaging \
+    python3-profile \
+"
-- 
2.40.1



^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 2/3] python3-meson-python: New recipe
  2023-06-02  7:44 [PATCH 1/3] python3-pyproject-metadata: New recipe Zoltán Böszörményi
@ 2023-06-02  7:44 ` Zoltán Böszörményi
  2023-06-02  7:44 ` [PATCH 3/3] python_mesonpy: New class Zoltán Böszörményi
  2023-06-02 17:21 ` [OE-core] [PATCH 1/3] python3-pyproject-metadata: New recipe Alexandre Belloni
  2 siblings, 0 replies; 9+ messages in thread
From: Zoltán Böszörményi @ 2023-06-02  7:44 UTC (permalink / raw)
  To: openembedded-core
  Cc: Alexander Kanavin, Alexandre Belloni,
	Zoltán Böszörményi

This python module adds support for a new PEP517 build backend
used by recent versions of scikit-image, scipy and others.

The previously added python_mesonpy.bbclass uses it

Signed-off-by: Zoltán Böszörményi <zboszor@gmail.com>
---
 meta/conf/distro/include/maintainers.inc      |  1 +
 .../python/python3-meson-python_0.13.1.bb     | 22 +++++++++++++++++++
 2 files changed, 23 insertions(+)
 create mode 100644 meta/recipes-devtools/python/python3-meson-python_0.13.1.bb

diff --git a/meta/conf/distro/include/maintainers.inc b/meta/conf/distro/include/maintainers.inc
index d910ce6481..232e5aa8f8 100644
--- a/meta/conf/distro/include/maintainers.inc
+++ b/meta/conf/distro/include/maintainers.inc
@@ -647,6 +647,7 @@ RECIPE_MAINTAINER:pn-python3-magic = "Joshua Watt <JPEWhacker@gmail.com>"
 RECIPE_MAINTAINER:pn-python3-mako = "Oleksandr Kravchuk <open.source@oleksandr-kravchuk.com>"
 RECIPE_MAINTAINER:pn-python3-markdown = "Alexander Kanavin <alex.kanavin@gmail.com>"
 RECIPE_MAINTAINER:pn-python3-markupsafe = "Richard Purdie <richard.purdie@linuxfoundation.org>"
+RECIPE_MAINTAINER:pn-python3-meson-python = "Zoltán Böszörményi <zboszor@gmail.com>"
 RECIPE_MAINTAINER:pn-python3-more-itertools = "Tim Orling <tim.orling@konsulko.com>"
 RECIPE_MAINTAINER:pn-python3-ndg-httpsclient = "Tim Orling <tim.orling@konsulko.com>"
 RECIPE_MAINTAINER:pn-python3-numpy = "Oleksandr Kravchuk <open.source@oleksandr-kravchuk.com>"
diff --git a/meta/recipes-devtools/python/python3-meson-python_0.13.1.bb b/meta/recipes-devtools/python/python3-meson-python_0.13.1.bb
new file mode 100644
index 0000000000..828a1652fa
--- /dev/null
+++ b/meta/recipes-devtools/python/python3-meson-python_0.13.1.bb
@@ -0,0 +1,22 @@
+SUMMARY = "Meson Python build backend (PEP 517)"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=d580b27e67cc0892a5b005b0be114b60"
+
+DEPENDS = " \
+	meson-native ninja-native patchelf-native \
+	python3-pyproject-metadata-native \
+"
+
+PYPI_PACKAGE = "meson_python"
+
+inherit pypi python_mesonpy
+SRC_URI[sha256sum] = "63b3170001425c42fa4cfedadb9051cbd28925ff8eed7c40d36ba0099e3c7618"
+
+DEPENDS:remove:class-native = "python3-meson-python-native"
+
+RDEPENDS:${PN} = " \
+	meson ninja patchelf \
+	python3-pyproject-metadata \
+"
+
+BBCLASSEXTEND = "native nativesdk"
-- 
2.40.1



^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 3/3] python_mesonpy: New class
  2023-06-02  7:44 [PATCH 1/3] python3-pyproject-metadata: New recipe Zoltán Böszörményi
  2023-06-02  7:44 ` [PATCH 2/3] python3-meson-python: " Zoltán Böszörményi
@ 2023-06-02  7:44 ` Zoltán Böszörményi
  2023-06-13 20:59   ` [OE-core] " Richard Purdie
  2023-06-02 17:21 ` [OE-core] [PATCH 1/3] python3-pyproject-metadata: New recipe Alexandre Belloni
  2 siblings, 1 reply; 9+ messages in thread
From: Zoltán Böszörményi @ 2023-06-02  7:44 UTC (permalink / raw)
  To: openembedded-core
  Cc: Alexander Kanavin, Alexandre Belloni,
	Zoltán Böszörményi

This is a new PEP517 compatible build class for python modules
that use pyproject.toml and this:

[build-system]
build-backend = 'mesonpy'

The new class uses python3-meson-python-native.

Signed-off-by: Zoltán Böszörményi <zboszor@gmail.com>
---
 meta/classes-recipe/python_mesonpy.bbclass | 54 ++++++++++++++++++++++
 1 file changed, 54 insertions(+)
 create mode 100644 meta/classes-recipe/python_mesonpy.bbclass

diff --git a/meta/classes-recipe/python_mesonpy.bbclass b/meta/classes-recipe/python_mesonpy.bbclass
new file mode 100644
index 0000000000..1da8b005ab
--- /dev/null
+++ b/meta/classes-recipe/python_mesonpy.bbclass
@@ -0,0 +1,54 @@
+#
+# Copyright OpenEmbedded Contributors
+#
+# SPDX-License-Identifier: MIT
+#
+
+inherit meson setuptools3-base python3targetconfig python_pep517
+
+# Filter out meson_do_qa_configure from do_configure[postfuncs]
+DOCONFIGUREPOSTFUNCS := "${@d.getVarFlag('do_configure', 'postfuncs')}"
+DOCONFIGUREPOSTFUNCS:remove = "meson_do_qa_configure"
+do_configure[postfuncs] := "${@'' if d.getVar('DOCONFIGUREPOSTFUNCS') is None else d.getVar('DOCONFIGUREPOSTFUNCS') }"
+
+# This prevents the meson error:
+# ERROR: Got argument buildtype as both -Dbuildtype and --buildtype. Pick one.
+MESONOPTS:remove = "--buildtype ${MESON_BUILDTYPE}"
+
+CONFIGURE_FILES = "pyproject.toml"
+
+DEPENDS += "python3-wheel-native python3-meson-python-native"
+
+def mesonpy_get_args(d):
+    vars = ['MESONOPTS', 'MESON_CROSS_FILE', 'EXTRA_OEMESON']
+    varlist = []
+    for var in vars:
+        value = d.getVar(var)
+        vallist = value.split()
+        for elem in vallist:
+            varlist.append("-Csetup-args=" + elem)
+    return ' '.join(varlist)
+
+PEP517_BUILD_OPTS = "-Cbuilddir='${B}' ${@mesonpy_get_args(d)}"
+
+# Python pyx -> c -> so build leaves absolute build paths in the code
+INSANE_SKIP:${PN} += "buildpaths"
+INSANE_SKIP:${PN}-src += "buildpaths"
+
+python_mesonpy_do_configure () {
+    python_pep517_do_configure
+}
+
+python_mesonpy_do_compile () {
+    python_pep517_do_compile
+}
+
+python_mesonpy_do_install () {
+    python_pep517_do_install
+}
+
+python_mesonpy_do_bootstrap_install () {
+    python_pep517_do_bootstrap_install
+}
+
+EXPORT_FUNCTIONS do_configure do_compile do_install
-- 
2.40.1



^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [OE-core] [PATCH 1/3] python3-pyproject-metadata: New recipe
  2023-06-02  7:44 [PATCH 1/3] python3-pyproject-metadata: New recipe Zoltán Böszörményi
  2023-06-02  7:44 ` [PATCH 2/3] python3-meson-python: " Zoltán Böszörményi
  2023-06-02  7:44 ` [PATCH 3/3] python_mesonpy: New class Zoltán Böszörményi
@ 2023-06-02 17:21 ` Alexandre Belloni
  2023-06-03  8:11   ` Böszörményi Zoltán
  2 siblings, 1 reply; 9+ messages in thread
From: Alexandre Belloni @ 2023-06-02 17:21 UTC (permalink / raw)
  To: Zoltan Boszormenyi; +Cc: openembedded-core, Alexander Kanavin

Hello,

the series causes the following warnings:

stdio: WARNING: python3-pyproject-metadata-native-0.7.1-r0 do_fetch: QA Issue: Recipe python3-pyproject-metadata in /home/pokybuild/yocto-worker/musl-qemux86/build/meta/recipes-devtools/python/python3-pyproject-metadata_0.7.1.bb does not contain a HOMEPAGE. Please add an entry. [missing-metadata]
stdio: WARNING: python3-pyproject-metadata-0.7.1-r0 do_fetch: QA Issue: Recipe python3-pyproject-metadata in /home/pokybuild/yocto-worker/musl-qemux86/build/meta/recipes-devtools/python/python3-pyproject-metadata_0.7.1.bb does not contain a HOMEPAGE. Please add an entry. [missing-metadata]
stdio: WARNING: python3-meson-python-0.13.1-r0 do_fetch: QA Issue: Recipe python3-meson-python in /home/pokybuild/yocto-worker/musl-qemux86/build/meta/recipes-devtools/python/python3-meson-python_0.13.1.bb does not contain a HOMEPAGE. Please add an entry. [missing-metadata]
stdio: WARNING: python3-meson-python-native-0.13.1-r0 do_fetch: QA Issue: Recipe python3-meson-python in /home/pokybuild/yocto-worker/musl-qemux86/build/meta/recipes-devtools/python/python3-meson-python_0.13.1.bb does not contain a HOMEPAGE. Please add an entry. [missing-metadata]

On 02/06/2023 09:44:17+0200, Zoltan Boszormenyi wrote:
> It is a dependency for python3-meson-python.
> 
> Signed-off-by: Zolt�n B�sz�rm�nyi <zboszor@gmail.com>
> ---
>  meta/conf/distro/include/maintainers.inc         |  1 +
>  .../python/python3-pyproject-metadata_0.7.1.bb   | 16 ++++++++++++++++
>  2 files changed, 17 insertions(+)
>  create mode 100644 meta/recipes-devtools/python/python3-pyproject-metadata_0.7.1.bb
> 
> diff --git a/meta/conf/distro/include/maintainers.inc b/meta/conf/distro/include/maintainers.inc
> index 5accca3fef..d910ce6481 100644
> --- a/meta/conf/distro/include/maintainers.inc
> +++ b/meta/conf/distro/include/maintainers.inc
> @@ -670,6 +670,7 @@ RECIPE_MAINTAINER:pn-python3-pygobject = "Zang Ruochen <zangruochen@loongson.cn>
>  RECIPE_MAINTAINER:pn-python3-pyopenssl = "Tim Orling <tim.orling@konsulko.com>"
>  RECIPE_MAINTAINER:pn-python3-pyparsing = "Oleksandr Kravchuk <open.source@oleksandr-kravchuk.com>"
>  RECIPE_MAINTAINER:pn-python3-pyproject-hooks = "Ross Burton <ross.burton@arm.com>"
> +RECIPE_MAINTAINER:pn-python3-pyproject-metadata = "Zolt�n B�sz�rm�nyi <zboszor@gmail.com>"
>  RECIPE_MAINTAINER:pn-python3-pysocks = "Tim Orling <tim.orling@konsulko.com>"
>  RECIPE_MAINTAINER:pn-python3-pytest = "Tim Orling <tim.orling@konsulko.com>"
>  RECIPE_MAINTAINER:pn-python3-pytest-runner = "Tim Orling <tim.orling@konsulko.com>"
> diff --git a/meta/recipes-devtools/python/python3-pyproject-metadata_0.7.1.bb b/meta/recipes-devtools/python/python3-pyproject-metadata_0.7.1.bb
> new file mode 100644
> index 0000000000..9887af78d0
> --- /dev/null
> +++ b/meta/recipes-devtools/python/python3-pyproject-metadata_0.7.1.bb
> @@ -0,0 +1,16 @@
> +SUMMARY = "PEP 621 metadata parsing"
> +LICENSE = "MIT"
> +LIC_FILES_CHKSUM = "file://LICENSE;md5=310439af287b0fb4780b2ad6907c256c"
> +
> +PYPI_PACKAGE = "pyproject-metadata"
> +
> +inherit pypi python_setuptools_build_meta
> +SRC_URI[sha256sum] = "0a94f18b108b9b21f3a26a3d541f056c34edcb17dc872a144a15618fed7aef67"
> +
> +BBCLASSEXTEND = "native nativesdk"
> +
> +RDEPENDS:${PN} += " \
> +    python3-logging \
> +    python3-packaging \
> +    python3-profile \
> +"
> -- 
> 2.40.1
> 

> 
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#182146): https://lists.openembedded.org/g/openembedded-core/message/182146
> Mute This Topic: https://lists.openembedded.org/mt/99281729/3617179
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [alexandre.belloni@bootlin.com]
> -=-=-=-=-=-=-=-=-=-=-=-
> 


-- 
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [OE-core] [PATCH 1/3] python3-pyproject-metadata: New recipe
  2023-06-02 17:21 ` [OE-core] [PATCH 1/3] python3-pyproject-metadata: New recipe Alexandre Belloni
@ 2023-06-03  8:11   ` Böszörményi Zoltán
  0 siblings, 0 replies; 9+ messages in thread
From: Böszörményi Zoltán @ 2023-06-03  8:11 UTC (permalink / raw)
  To: Alexandre Belloni; +Cc: openembedded-core, Alexander Kanavin

2023. 06. 02. 19:21 keltezéssel, Alexandre Belloni írta:
> Hello,
>
> the series causes the following warnings:

Thanks. Just sent v4 with adding HOMEPAGE to both recipes.

> stdio: WARNING: python3-pyproject-metadata-native-0.7.1-r0 do_fetch: QA Issue: Recipe python3-pyproject-metadata in /home/pokybuild/yocto-worker/musl-qemux86/build/meta/recipes-devtools/python/python3-pyproject-metadata_0.7.1.bb does not contain a HOMEPAGE. Please add an entry. [missing-metadata]
> stdio: WARNING: python3-pyproject-metadata-0.7.1-r0 do_fetch: QA Issue: Recipe python3-pyproject-metadata in /home/pokybuild/yocto-worker/musl-qemux86/build/meta/recipes-devtools/python/python3-pyproject-metadata_0.7.1.bb does not contain a HOMEPAGE. Please add an entry. [missing-metadata]
> stdio: WARNING: python3-meson-python-0.13.1-r0 do_fetch: QA Issue: Recipe python3-meson-python in /home/pokybuild/yocto-worker/musl-qemux86/build/meta/recipes-devtools/python/python3-meson-python_0.13.1.bb does not contain a HOMEPAGE. Please add an entry. [missing-metadata]
> stdio: WARNING: python3-meson-python-native-0.13.1-r0 do_fetch: QA Issue: Recipe python3-meson-python in /home/pokybuild/yocto-worker/musl-qemux86/build/meta/recipes-devtools/python/python3-meson-python_0.13.1.bb does not contain a HOMEPAGE. Please add an entry. [missing-metadata]
>
> On 02/06/2023 09:44:17+0200, Zoltan Boszormenyi wrote:
>> It is a dependency for python3-meson-python.
>>
>> Signed-off-by: Zoltán Böszörményi <zboszor@gmail.com>
>> ---
>>   meta/conf/distro/include/maintainers.inc         |  1 +
>>   .../python/python3-pyproject-metadata_0.7.1.bb   | 16 ++++++++++++++++
>>   2 files changed, 17 insertions(+)
>>   create mode 100644 meta/recipes-devtools/python/python3-pyproject-metadata_0.7.1.bb
>>
>> diff --git a/meta/conf/distro/include/maintainers.inc b/meta/conf/distro/include/maintainers.inc
>> index 5accca3fef..d910ce6481 100644
>> --- a/meta/conf/distro/include/maintainers.inc
>> +++ b/meta/conf/distro/include/maintainers.inc
>> @@ -670,6 +670,7 @@ RECIPE_MAINTAINER:pn-python3-pygobject = "Zang Ruochen <zangruochen@loongson.cn>
>>   RECIPE_MAINTAINER:pn-python3-pyopenssl = "Tim Orling <tim.orling@konsulko.com>"
>>   RECIPE_MAINTAINER:pn-python3-pyparsing = "Oleksandr Kravchuk <open.source@oleksandr-kravchuk.com>"
>>   RECIPE_MAINTAINER:pn-python3-pyproject-hooks = "Ross Burton <ross.burton@arm.com>"
>> +RECIPE_MAINTAINER:pn-python3-pyproject-metadata = "Zoltán Böszörményi <zboszor@gmail.com>"
>>   RECIPE_MAINTAINER:pn-python3-pysocks = "Tim Orling <tim.orling@konsulko.com>"
>>   RECIPE_MAINTAINER:pn-python3-pytest = "Tim Orling <tim.orling@konsulko.com>"
>>   RECIPE_MAINTAINER:pn-python3-pytest-runner = "Tim Orling <tim.orling@konsulko.com>"
>> diff --git a/meta/recipes-devtools/python/python3-pyproject-metadata_0.7.1.bb b/meta/recipes-devtools/python/python3-pyproject-metadata_0.7.1.bb
>> new file mode 100644
>> index 0000000000..9887af78d0
>> --- /dev/null
>> +++ b/meta/recipes-devtools/python/python3-pyproject-metadata_0.7.1.bb
>> @@ -0,0 +1,16 @@
>> +SUMMARY = "PEP 621 metadata parsing"
>> +LICENSE = "MIT"
>> +LIC_FILES_CHKSUM = "file://LICENSE;md5=310439af287b0fb4780b2ad6907c256c"
>> +
>> +PYPI_PACKAGE = "pyproject-metadata"
>> +
>> +inherit pypi python_setuptools_build_meta
>> +SRC_URI[sha256sum] = "0a94f18b108b9b21f3a26a3d541f056c34edcb17dc872a144a15618fed7aef67"
>> +
>> +BBCLASSEXTEND = "native nativesdk"
>> +
>> +RDEPENDS:${PN} += " \
>> +    python3-logging \
>> +    python3-packaging \
>> +    python3-profile \
>> +"
>> -- 
>> 2.40.1
>>
>> -=-=-=-=-=-=-=-=-=-=-=-
>> Links: You receive all messages sent to this group.
>> View/Reply Online (#182146): https://lists.openembedded.org/g/openembedded-core/message/182146
>> Mute This Topic: https://lists.openembedded.org/mt/99281729/3617179
>> Group Owner: openembedded-core+owner@lists.openembedded.org
>> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [alexandre.belloni@bootlin.com]
>> -=-=-=-=-=-=-=-=-=-=-=-
>>
>



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [OE-core] [PATCH 3/3] python_mesonpy: New class
  2023-06-02  7:44 ` [PATCH 3/3] python_mesonpy: New class Zoltán Böszörményi
@ 2023-06-13 20:59   ` Richard Purdie
  2023-06-14  5:46     ` Böszörményi Zoltán
  0 siblings, 1 reply; 9+ messages in thread
From: Richard Purdie @ 2023-06-13 20:59 UTC (permalink / raw)
  To: Zoltan Boszormenyi, openembedded-core
  Cc: Alexander Kanavin, Alexandre Belloni

On Fri, 2023-06-02 at 09:44 +0200, Zoltan Boszormenyi wrote:
> This is a new PEP517 compatible build class for python modules
> that use pyproject.toml and this:
> 
> [build-system]
> build-backend = 'mesonpy'
> 
> The new class uses python3-meson-python-native.
> 
> Signed-off-by: Zoltán Böszörményi <zboszor@gmail.com>
> ---
>  meta/classes-recipe/python_mesonpy.bbclass | 54 ++++++++++++++++++++++
>  1 file changed, 54 insertions(+)
>  create mode 100644 meta/classes-recipe/python_mesonpy.bbclass
> 
> diff --git a/meta/classes-recipe/python_mesonpy.bbclass b/meta/classes-recipe/python_mesonpy.bbclass
> new file mode 100644
> index 0000000000..1da8b005ab
> --- /dev/null
> +++ b/meta/classes-recipe/python_mesonpy.bbclass
> @@ -0,0 +1,54 @@
> +#
> +# Copyright OpenEmbedded Contributors
> +#
> +# SPDX-License-Identifier: MIT
> +#
> +
> +inherit meson setuptools3-base python3targetconfig python_pep517
> +
> +# Filter out meson_do_qa_configure from do_configure[postfuncs]
> +DOCONFIGUREPOSTFUNCS := "${@d.getVarFlag('do_configure', 'postfuncs')}"
> +DOCONFIGUREPOSTFUNCS:remove = "meson_do_qa_configure"
> +do_configure[postfuncs] := "${@'' if d.getVar('DOCONFIGUREPOSTFUNCS') is None else d.getVar('DOCONFIGUREPOSTFUNCS') }"
> +
> +# This prevents the meson error:
> +# ERROR: Got argument buildtype as both -Dbuildtype and --buildtype. Pick one.
> +MESONOPTS:remove = "--buildtype ${MESON_BUILDTYPE}"
> +
> +CONFIGURE_FILES = "pyproject.toml"
> +
> +DEPENDS += "python3-wheel-native python3-meson-python-native"
> +
> +def mesonpy_get_args(d):
> +    vars = ['MESONOPTS', 'MESON_CROSS_FILE', 'EXTRA_OEMESON']
> +    varlist = []
> +    for var in vars:
> +        value = d.getVar(var)
> +        vallist = value.split()
> +        for elem in vallist:
> +            varlist.append("-Csetup-args=" + elem)
> +    return ' '.join(varlist)
> +
> +PEP517_BUILD_OPTS = "-Cbuilddir='${B}' ${@mesonpy_get_args(d)}"
> +
> +# Python pyx -> c -> so build leaves absolute build paths in the code
> +INSANE_SKIP:${PN} += "buildpaths"
> +INSANE_SKIP:${PN}-src += "buildpaths"

This is not ready for core as the output is not reproducible. I am not
taking patches which skip buildpaths warnings.

This also shows that the code is not being tested in OE-Core. Until it
is needed by and being used by something in core, I don't think it
should be there.

Cheers,

Richard



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [OE-core] [PATCH 3/3] python_mesonpy: New class
  2023-06-13 20:59   ` [OE-core] " Richard Purdie
@ 2023-06-14  5:46     ` Böszörményi Zoltán
  2023-06-14  9:52       ` Richard Purdie
  0 siblings, 1 reply; 9+ messages in thread
From: Böszörményi Zoltán @ 2023-06-14  5:46 UTC (permalink / raw)
  To: Richard Purdie, openembedded-core; +Cc: Alexander Kanavin, Alexandre Belloni

2023. 06. 13. 22:59 keltezéssel, Richard Purdie írta:
> On Fri, 2023-06-02 at 09:44 +0200, Zoltan Boszormenyi wrote:
>> This is a new PEP517 compatible build class for python modules
>> that use pyproject.toml and this:
>>
>> [build-system]
>> build-backend = 'mesonpy'
>>
>> The new class uses python3-meson-python-native.
>>
>> Signed-off-by: Zoltán Böszörményi <zboszor@gmail.com>
>> ---
>>   meta/classes-recipe/python_mesonpy.bbclass | 54 ++++++++++++++++++++++
>>   1 file changed, 54 insertions(+)
>>   create mode 100644 meta/classes-recipe/python_mesonpy.bbclass
>>
>> diff --git a/meta/classes-recipe/python_mesonpy.bbclass b/meta/classes-recipe/python_mesonpy.bbclass
>> new file mode 100644
>> index 0000000000..1da8b005ab
>> --- /dev/null
>> +++ b/meta/classes-recipe/python_mesonpy.bbclass
>> @@ -0,0 +1,54 @@
>> +#
>> +# Copyright OpenEmbedded Contributors
>> +#
>> +# SPDX-License-Identifier: MIT
>> +#
>> +
>> +inherit meson setuptools3-base python3targetconfig python_pep517
>> +
>> +# Filter out meson_do_qa_configure from do_configure[postfuncs]
>> +DOCONFIGUREPOSTFUNCS := "${@d.getVarFlag('do_configure', 'postfuncs')}"
>> +DOCONFIGUREPOSTFUNCS:remove = "meson_do_qa_configure"
>> +do_configure[postfuncs] := "${@'' if d.getVar('DOCONFIGUREPOSTFUNCS') is None else d.getVar('DOCONFIGUREPOSTFUNCS') }"
>> +
>> +# This prevents the meson error:
>> +# ERROR: Got argument buildtype as both -Dbuildtype and --buildtype. Pick one.
>> +MESONOPTS:remove = "--buildtype ${MESON_BUILDTYPE}"
>> +
>> +CONFIGURE_FILES = "pyproject.toml"
>> +
>> +DEPENDS += "python3-wheel-native python3-meson-python-native"
>> +
>> +def mesonpy_get_args(d):
>> +    vars = ['MESONOPTS', 'MESON_CROSS_FILE', 'EXTRA_OEMESON']
>> +    varlist = []
>> +    for var in vars:
>> +        value = d.getVar(var)
>> +        vallist = value.split()
>> +        for elem in vallist:
>> +            varlist.append("-Csetup-args=" + elem)
>> +    return ' '.join(varlist)
>> +
>> +PEP517_BUILD_OPTS = "-Cbuilddir='${B}' ${@mesonpy_get_args(d)}"
>> +
>> +# Python pyx -> c -> so build leaves absolute build paths in the code
>> +INSANE_SKIP:${PN} += "buildpaths"
>> +INSANE_SKIP:${PN}-src += "buildpaths"
> This is not ready for core as the output is not reproducible. I am not
> taking patches which skip buildpaths warnings.
>
> This also shows that the code is not being tested in OE-Core. Until it
> is needed by and being used by something in core, I don't think it
> should be there.

This thread was long time dead. The series was sent to meta-oe.

>
> Cheers,
>
> Richard
>



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [OE-core] [PATCH 3/3] python_mesonpy: New class
  2023-06-14  5:46     ` Böszörményi Zoltán
@ 2023-06-14  9:52       ` Richard Purdie
  2023-06-14 12:27         ` Böszörményi Zoltán
  0 siblings, 1 reply; 9+ messages in thread
From: Richard Purdie @ 2023-06-14  9:52 UTC (permalink / raw)
  To: Böszörményi Zoltán, openembedded-core
  Cc: Alexander Kanavin, Alexandre Belloni

On Wed, 2023-06-14 at 07:46 +0200, Böszörményi Zoltán wrote:
> 2023. 06. 13. 22:59 keltezéssel, Richard Purdie írta:
> > On Fri, 2023-06-02 at 09:44 +0200, Zoltan Boszormenyi wrote:
> > > This is a new PEP517 compatible build class for python modules
> > > that use pyproject.toml and this:
> > > 
> > > [build-system]
> > > build-backend = 'mesonpy'
> > > 
> > > The new class uses python3-meson-python-native.
> > > 
> > > Signed-off-by: Zoltán Böszörményi <zboszor@gmail.com>
> > > ---
> > >   meta/classes-recipe/python_mesonpy.bbclass | 54 ++++++++++++++++++++++
> > >   1 file changed, 54 insertions(+)
> > >   create mode 100644 meta/classes-recipe/python_mesonpy.bbclass
> > > 
> > > diff --git a/meta/classes-recipe/python_mesonpy.bbclass b/meta/classes-recipe/python_mesonpy.bbclass
> > > new file mode 100644
> > > index 0000000000..1da8b005ab
> > > --- /dev/null
> > > +++ b/meta/classes-recipe/python_mesonpy.bbclass
> > > @@ -0,0 +1,54 @@
> > > +#
> > > +# Copyright OpenEmbedded Contributors
> > > +#
> > > +# SPDX-License-Identifier: MIT
> > > +#
> > > +
> > > +inherit meson setuptools3-base python3targetconfig python_pep517
> > > +
> > > +# Filter out meson_do_qa_configure from do_configure[postfuncs]
> > > +DOCONFIGUREPOSTFUNCS := "${@d.getVarFlag('do_configure', 'postfuncs')}"
> > > +DOCONFIGUREPOSTFUNCS:remove = "meson_do_qa_configure"
> > > +do_configure[postfuncs] := "${@'' if d.getVar('DOCONFIGUREPOSTFUNCS') is None else d.getVar('DOCONFIGUREPOSTFUNCS') }"
> > > +
> > > +# This prevents the meson error:
> > > +# ERROR: Got argument buildtype as both -Dbuildtype and --buildtype. Pick one.
> > > +MESONOPTS:remove = "--buildtype ${MESON_BUILDTYPE}"
> > > +
> > > +CONFIGURE_FILES = "pyproject.toml"
> > > +
> > > +DEPENDS += "python3-wheel-native python3-meson-python-native"
> > > +
> > > +def mesonpy_get_args(d):
> > > +    vars = ['MESONOPTS', 'MESON_CROSS_FILE', 'EXTRA_OEMESON']
> > > +    varlist = []
> > > +    for var in vars:
> > > +        value = d.getVar(var)
> > > +        vallist = value.split()
> > > +        for elem in vallist:
> > > +            varlist.append("-Csetup-args=" + elem)
> > > +    return ' '.join(varlist)
> > > +
> > > +PEP517_BUILD_OPTS = "-Cbuilddir='${B}' ${@mesonpy_get_args(d)}"
> > > +
> > > +# Python pyx -> c -> so build leaves absolute build paths in the code
> > > +INSANE_SKIP:${PN} += "buildpaths"
> > > +INSANE_SKIP:${PN}-src += "buildpaths"
> > This is not ready for core as the output is not reproducible. I am not
> > taking patches which skip buildpaths warnings.
> > 
> > This also shows that the code is not being tested in OE-Core. Until it
> > is needed by and being used by something in core, I don't think it
> > should be there.
> 
> This thread was long time dead. The series was sent to meta-oe.

Was the reproducibility issue fixed? It really does need to be as we
have things like hash equivalence which depend upon that...

Cheers,

Richard


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [OE-core] [PATCH 3/3] python_mesonpy: New class
  2023-06-14  9:52       ` Richard Purdie
@ 2023-06-14 12:27         ` Böszörményi Zoltán
  0 siblings, 0 replies; 9+ messages in thread
From: Böszörményi Zoltán @ 2023-06-14 12:27 UTC (permalink / raw)
  To: Richard Purdie, openembedded-core; +Cc: Alexander Kanavin, Alexandre Belloni

2023. 06. 14. 11:52 keltezéssel, Richard Purdie írta:
> On Wed, 2023-06-14 at 07:46 +0200, Böszörményi Zoltán wrote:
>> 2023. 06. 13. 22:59 keltezéssel, Richard Purdie írta:
>>> On Fri, 2023-06-02 at 09:44 +0200, Zoltan Boszormenyi wrote:
>>>> This is a new PEP517 compatible build class for python modules
>>>> that use pyproject.toml and this:
>>>>
>>>> [build-system]
>>>> build-backend = 'mesonpy'
>>>>
>>>> The new class uses python3-meson-python-native.
>>>>
>>>> Signed-off-by: Zoltán Böszörményi <zboszor@gmail.com>
>>>> ---
>>>>    meta/classes-recipe/python_mesonpy.bbclass | 54 ++++++++++++++++++++++
>>>>    1 file changed, 54 insertions(+)
>>>>    create mode 100644 meta/classes-recipe/python_mesonpy.bbclass
>>>>
>>>> diff --git a/meta/classes-recipe/python_mesonpy.bbclass b/meta/classes-recipe/python_mesonpy.bbclass
>>>> new file mode 100644
>>>> index 0000000000..1da8b005ab
>>>> --- /dev/null
>>>> +++ b/meta/classes-recipe/python_mesonpy.bbclass
>>>> @@ -0,0 +1,54 @@
>>>> +#
>>>> +# Copyright OpenEmbedded Contributors
>>>> +#
>>>> +# SPDX-License-Identifier: MIT
>>>> +#
>>>> +
>>>> +inherit meson setuptools3-base python3targetconfig python_pep517
>>>> +
>>>> +# Filter out meson_do_qa_configure from do_configure[postfuncs]
>>>> +DOCONFIGUREPOSTFUNCS := "${@d.getVarFlag('do_configure', 'postfuncs')}"
>>>> +DOCONFIGUREPOSTFUNCS:remove = "meson_do_qa_configure"
>>>> +do_configure[postfuncs] := "${@'' if d.getVar('DOCONFIGUREPOSTFUNCS') is None else d.getVar('DOCONFIGUREPOSTFUNCS') }"
>>>> +
>>>> +# This prevents the meson error:
>>>> +# ERROR: Got argument buildtype as both -Dbuildtype and --buildtype. Pick one.
>>>> +MESONOPTS:remove = "--buildtype ${MESON_BUILDTYPE}"
>>>> +
>>>> +CONFIGURE_FILES = "pyproject.toml"
>>>> +
>>>> +DEPENDS += "python3-wheel-native python3-meson-python-native"
>>>> +
>>>> +def mesonpy_get_args(d):
>>>> +    vars = ['MESONOPTS', 'MESON_CROSS_FILE', 'EXTRA_OEMESON']
>>>> +    varlist = []
>>>> +    for var in vars:
>>>> +        value = d.getVar(var)
>>>> +        vallist = value.split()
>>>> +        for elem in vallist:
>>>> +            varlist.append("-Csetup-args=" + elem)
>>>> +    return ' '.join(varlist)
>>>> +
>>>> +PEP517_BUILD_OPTS = "-Cbuilddir='${B}' ${@mesonpy_get_args(d)}"
>>>> +
>>>> +# Python pyx -> c -> so build leaves absolute build paths in the code
>>>> +INSANE_SKIP:${PN} += "buildpaths"
>>>> +INSANE_SKIP:${PN}-src += "buildpaths"
>>> This is not ready for core as the output is not reproducible. I am not
>>> taking patches which skip buildpaths warnings.
>>>
>>> This also shows that the code is not being tested in OE-Core. Until it
>>> is needed by and being used by something in core, I don't think it
>>> should be there.
>> This thread was long time dead. The series was sent to meta-oe.
> Was the reproducibility issue fixed?

You tell me. This is something to be fixed in Cython, as the
pyx -> C/C++ translation is responsible for those warnings,
not mesonpy.

I am happy to remove those INSANE_SKIP settings, though.

>   It really does need to be as we
> have things like hash equivalence which depend upon that...
>
> Cheers,
>
> Richard



^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2023-06-14 12:27 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-06-02  7:44 [PATCH 1/3] python3-pyproject-metadata: New recipe Zoltán Böszörményi
2023-06-02  7:44 ` [PATCH 2/3] python3-meson-python: " Zoltán Böszörményi
2023-06-02  7:44 ` [PATCH 3/3] python_mesonpy: New class Zoltán Böszörményi
2023-06-13 20:59   ` [OE-core] " Richard Purdie
2023-06-14  5:46     ` Böszörményi Zoltán
2023-06-14  9:52       ` Richard Purdie
2023-06-14 12:27         ` Böszörményi Zoltán
2023-06-02 17:21 ` [OE-core] [PATCH 1/3] python3-pyproject-metadata: New recipe Alexandre Belloni
2023-06-03  8:11   ` Böszörményi Zoltán

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).