From patchwork Thu Jun 1 08:08:20 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?QsO2c3rDtnJtw6lueWkgWm9sdMOhbg==?= X-Patchwork-Id: 24949 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5D6EEC7EE2A for ; Thu, 1 Jun 2023 08:08:28 +0000 (UTC) Received: from mail-wm1-f50.google.com (mail-wm1-f50.google.com [209.85.128.50]) by mx.groups.io with SMTP id smtpd.web11.26038.1685606906303253169 for ; Thu, 01 Jun 2023 01:08:26 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="signature has expired" header.i=@gmail.com header.s=20221208 header.b=VjDpaYoR; spf=pass (domain: gmail.com, ip: 209.85.128.50, mailfrom: zboszor@gmail.com) Received: by mail-wm1-f50.google.com with SMTP id 5b1f17b1804b1-3f6a6b9c079so5486425e9.1 for ; Thu, 01 Jun 2023 01:08:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1685606904; x=1688198904; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=H/49Xjj7g0KGr6mzQb2M+nd8WQXO/9VdM4cxbpnHsoY=; b=VjDpaYoRD2TVezkXjMbbC9ioDmXYr4zVVjzdL8A+os+qusDpeaxhsiLZAEhuRpWFy6 HCjw7O6oS0O/PhKIOWN0V5BHdePn6FOU/kG3/WTJXpWUfNC1/Cez1GaJlC5LGBLLOzKR fKpTg5X9o+WyEygmrtXyxiJCGd9/HZxIX2ZUc/rpHuNv7p2bXnBmWyS6PJYydpqTvj1r wGl2Dx7cfsShzr7COnAHKFpd1J6KyHugwFTaaqqjZ98RrLzTPKF1CHr0t6/0v5B5BiFY AC2/4cG1TCRkWM8DvmqRou4qSgRAbfsUb28opgaCSxKOJBjLq7l9nKB6MvxAXHMb/wiV fZhQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685606904; x=1688198904; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=H/49Xjj7g0KGr6mzQb2M+nd8WQXO/9VdM4cxbpnHsoY=; b=lDSItpNBKpkoatauqvO8X/POi7rfSnjASP+24lkk1gvbeFS3Tk59EwK1mrUEFCtr8j 4SdnvI04HIIgIbWUiT1ZFNf0TLdrbzL4IIlnO9enw7OZfZvNGA45lw9yTs+766d5aHYx 0f+ot53JTyw5xcq5EfN1RnYjo5lZFVv+N25dyIxpVzIqLBaH3RFVfTEXy7JZk+soNKG4 0clk3/v56bCntY36Y+WKoct6Fxlv2i7GdR1sTPlliwM0QH6LfgWIB+tZFRE1vUn2MPDV NZsHlIFSRh4Y2eWibg3fr2fw9mo8xoiFb8mwJnFHMHA/f0Jsw3AYjyRP0Lyc+tEE5s+T iClg== X-Gm-Message-State: AC+VfDyjhI4w5mDdfQJsXFFl9yCeQn1zDOBJCjgHhJU2lwfbEUsjohQz tDWiE8gAzHSHBP4CCo3V1bhOgNeYZps= X-Google-Smtp-Source: ACHHUZ59JxB67Ted1Q0wz9dn2gsBOvE7c/mbqk2bybYJl7zSiI2BmKWBdnWznSONZYnCtiseGvjnXQ== X-Received: by 2002:a05:600c:3784:b0:3f4:ed25:8aa9 with SMTP id o4-20020a05600c378400b003f4ed258aa9mr1216505wmr.36.1685606904180; Thu, 01 Jun 2023 01:08:24 -0700 (PDT) Received: from localhost.lan (dsl51B7D2F9.fixip.t-online.hu. [81.183.210.249]) by smtp.gmail.com with ESMTPSA id x13-20020a1c7c0d000000b003f4247fbb5fsm1380109wmc.10.2023.06.01.01.08.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Jun 2023 01:08:23 -0700 (PDT) From: =?utf-8?b?Wm9sdMOhbiBCw7ZzesO2cm3DqW55aQ==?= To: openembedded-core@lists.openembedded.org Cc: Alexander Kanavin , =?utf-8?b?Wm9sdMOhbiBCw7Zz?= =?utf-8?b?esO2cm3DqW55aQ==?= Subject: [PATCH v2 1/2] python_mesonpy: New class Date: Thu, 1 Jun 2023 10:08:20 +0200 Message-Id: <20230601080821.2346868-1-zboszor@gmail.com> X-Mailer: git-send-email 2.40.1 MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Thu, 01 Jun 2023 08:08:28 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/182053 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 --- 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 From patchwork Thu Jun 1 08:08:21 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?QsO2c3rDtnJtw6lueWkgWm9sdMOhbg==?= X-Patchwork-Id: 24950 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5A747C7EE29 for ; Thu, 1 Jun 2023 08:08:28 +0000 (UTC) Received: from mail-lf1-f49.google.com (mail-lf1-f49.google.com [209.85.167.49]) by mx.groups.io with SMTP id smtpd.web11.26039.1685606906962497019 for ; Thu, 01 Jun 2023 01:08:27 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="signature has expired" header.i=@gmail.com header.s=20221208 header.b=VZXhfUA3; spf=pass (domain: gmail.com, ip: 209.85.167.49, mailfrom: zboszor@gmail.com) Received: by mail-lf1-f49.google.com with SMTP id 2adb3069b0e04-4f3b9c88af8so544090e87.2 for ; Thu, 01 Jun 2023 01:08:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1685606905; x=1688198905; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=yzvorbUtQumgdxMkNzOZlEsv6tuJxoiYHmdDSORCq20=; b=VZXhfUA3ljXwX9OiurJBIITxkzCkSdIJcBpap1nEBkzjAfWVpiSttIZF+J166CpIZ9 bK8m2VrKiCXLq1uKAWTaOmJ6TsTHti1/FLV3mCvhxLgCcEYspqq9odhsky1k88sY5+8i uhW8J2owztbZJErvMH7svXjFJ/RUTtQgywmWQsUKZ+V2NxHcqsidQbNPd/jf7G0lecD6 lii1GgJ0yltlDolcyEuPAd8gV2N0OQxZR0Y6wemUrU4q9OIBjmWJmPxof2YeiTqLo+mY IhXrEnOcT3gVv/cYSXYYhQCCtF8A8dMQUif9ILzriYbWdd2bP+oVo1BstEYwelG+z5gs oEbA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685606905; x=1688198905; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=yzvorbUtQumgdxMkNzOZlEsv6tuJxoiYHmdDSORCq20=; b=jiv5nm9XEOHlV2UXzFwk8nVCQywAaKulJbmz9ZD3y6bwgBYZIAFFDZysz2JYEKNgJV dH46ELYKXY/9q0W9kTarHJjYjNC5mOmGKdwov6Iw63BaMqCg+q+RHMeGWsfnOYNL5a7S ZDk1ISCnm9tAYphv/Qav7zbElYGjwijfcY93Qw8v8b3kEiEAmPuNvG7618vVXowEW0ds R5xAKl23ggWGi/mEOpwwlj/6K9sDF9EmBZ7s15LEqNWD0LP4DNJwxI6j2as79yoHIkno qDgmwUohf1ftkdQsqcsrK7z0+ryNclClEKT4Q4BV/pQVg7/FOYGxt3oSTd5yY+ySSQGv aXkw== X-Gm-Message-State: AC+VfDxLBDiIMwhgR3S8pAxRwzAl97Op8LwXaI8PEQz8M5R94w60VqNY ainiQzn97LAkrFFPF/sY35VA7Bt60HI= X-Google-Smtp-Source: ACHHUZ58tiwvlSJxJ0bEMMZ5Kf750u6jiV8G6X0xHVo09DwUn86bX5Xe2F6NKgMwTShtH2v1pN6qmA== X-Received: by 2002:ac2:456e:0:b0:4f5:a17f:4898 with SMTP id k14-20020ac2456e000000b004f5a17f4898mr781578lfm.67.1685606904715; Thu, 01 Jun 2023 01:08:24 -0700 (PDT) Received: from localhost.lan (dsl51B7D2F9.fixip.t-online.hu. [81.183.210.249]) by smtp.gmail.com with ESMTPSA id x13-20020a1c7c0d000000b003f4247fbb5fsm1380109wmc.10.2023.06.01.01.08.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Jun 2023 01:08:24 -0700 (PDT) From: =?utf-8?b?Wm9sdMOhbiBCw7ZzesO2cm3DqW55aQ==?= To: openembedded-core@lists.openembedded.org Cc: Alexander Kanavin , =?utf-8?b?Wm9sdMOhbiBCw7Zz?= =?utf-8?b?esO2cm3DqW55aQ==?= Subject: [PATCH v2 2/2] python3-meson-python: New recipe Date: Thu, 1 Jun 2023 10:08:21 +0200 Message-Id: <20230601080821.2346868-2-zboszor@gmail.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230601080821.2346868-1-zboszor@gmail.com> References: <20230601080821.2346868-1-zboszor@gmail.com> MIME-Version: 1.0 List-Id: X-Webhook-Received: from li982-79.members.linode.com [45.33.32.79] by aws-us-west-2-korg-lkml-1.web.codeaurora.org with HTTPS for ; Thu, 01 Jun 2023 08:08:28 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/182054 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 --- 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 8c4c586414..f2448ee3c9 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 " RECIPE_MAINTAINER:pn-python3-mako = "Oleksandr Kravchuk " RECIPE_MAINTAINER:pn-python3-markdown = "Alexander Kanavin " RECIPE_MAINTAINER:pn-python3-markupsafe = "Richard Purdie " +RECIPE_MAINTAINER:pn-python3-meson-python = "Zoltán Böszörményi " RECIPE_MAINTAINER:pn-python3-more-itertools = "Tim Orling " RECIPE_MAINTAINER:pn-python3-ndg-httpsclient = "Tim Orling " RECIPE_MAINTAINER:pn-python3-numpy = "Oleksandr Kravchuk " 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"