From patchwork Fri Jun 2 07:44:17 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: 25035 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 23F6CC7EE2F for ; Fri, 2 Jun 2023 07:44:31 +0000 (UTC) Received: from mail-wm1-f49.google.com (mail-wm1-f49.google.com [209.85.128.49]) by mx.groups.io with SMTP id smtpd.web11.7182.1685691866184622407 for ; Fri, 02 Jun 2023 00:44:26 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="signature has expired" header.i=@gmail.com header.s=20221208 header.b=ofiNKo3X; spf=pass (domain: gmail.com, ip: 209.85.128.49, mailfrom: zboszor@gmail.com) Received: by mail-wm1-f49.google.com with SMTP id 5b1f17b1804b1-3f606a80d34so16771005e9.0 for ; Fri, 02 Jun 2023 00:44:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1685691864; x=1688283864; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=1BFw6K2e9ETEWySy17xN13bsi0vS1ikRJjLebfVtFHM=; b=ofiNKo3X8eCwylQaQCAbu4ncxemuvxqAgoVQPTEj9WimPvgdDiFcJlrS1RQ7HQH//1 dp3v7iDwurHHW2/uCNvGHyv7eXf7rvrE0pQHaGJ/ikLp+PVkbdEQ2DIDsEu75exbXgw5 /N8bAOqyl+M5d36sXdIUz01cgTPrANaq8bZL4puEYw/SeNiltk57gi6z+ofWwe30z1qJ /GjBJ3i18n6OWng/4lZCmMeEozKiPWv+Xc0+WkpbOT8JtU0cjx08t+xsqpPccnxrMaPW iUCST7FMxOyYoP5PIRuNDbROR13PP+nYdq5zG1qWA39P45ayGfuI/IlMUjIeb2Va84VQ +hDQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685691864; x=1688283864; 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=1BFw6K2e9ETEWySy17xN13bsi0vS1ikRJjLebfVtFHM=; b=eaWw6PG3lj8/f27OwpWRBCk1Bxqsr5zbSLZqOOPrVMXmdiJduBhedUOD9HZ0Fp/xhq gDKPbIxTpQHsZrXD2pnWPgJPDktwPRA+D/4MnpR1w8FhTRHUOTU4z53hTOysjHQMFGQP h5j7OqZdi4zeIKU9977nDv5KrjGyZ5y7YtXVeIlaN86bks+P6DPOV+99H04eTkHj0NFU 4NkO5DLjjfYmZiJn9pb9jcC7a83yYwyqmk6LThloZnEFrrnHUKd+dDxX3JPKYpv3tSQF P+/+7wVB6qwCN4dFFqkMn4hH7ueGueT4EXaR7BgV4NcvWgcATME3fIXJwjFzn7xOVwry D3yg== X-Gm-Message-State: AC+VfDzA3G+snQjV2cK1ygZ0KDKCKkdosfsj15UpcjTaJ07I6+FD5/iz MerJFwN8c7Ricv8OgCgwqC8TBbR2Udc= X-Google-Smtp-Source: ACHHUZ4PY6GqjJyeUijCD2OHNagayUehWlxs1HQ+bGujYenwTeuY2Y7vZBRJpWb6wIC0j5melSUAHg== X-Received: by 2002:a05:600c:2114:b0:3f6:97e:b45d with SMTP id u20-20020a05600c211400b003f6097eb45dmr1188281wml.24.1685691864014; Fri, 02 Jun 2023 00:44:24 -0700 (PDT) Received: from localhost.lan (dsl51B7D2F9.fixip.t-online.hu. [81.183.210.249]) by smtp.gmail.com with ESMTPSA id v6-20020a05600c214600b003f607875e5csm4596225wml.24.2023.06.02.00.44.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Jun 2023 00:44:23 -0700 (PDT) From: =?utf-8?b?Wm9sdMOhbiBCw7ZzesO2cm3DqW55aQ==?= To: openembedded-core@lists.openembedded.org Cc: Alexander Kanavin , Alexandre Belloni , =?utf-8?b?Wm9sdMOhbiBC?= =?utf-8?b?w7ZzesO2cm3DqW55aQ==?= Subject: [PATCH 1/3] python3-pyproject-metadata: New recipe Date: Fri, 2 Jun 2023 09:44:17 +0200 Message-Id: <20230602074419.2450399-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 ; Fri, 02 Jun 2023 07:44:31 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/182146 It is a dependency for python3-meson-python. Signed-off-by: Zoltán Böszörményi --- 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 RECIPE_MAINTAINER:pn-python3-pyopenssl = "Tim Orling " RECIPE_MAINTAINER:pn-python3-pyparsing = "Oleksandr Kravchuk " RECIPE_MAINTAINER:pn-python3-pyproject-hooks = "Ross Burton " +RECIPE_MAINTAINER:pn-python3-pyproject-metadata = "Zoltán Böszörményi " RECIPE_MAINTAINER:pn-python3-pysocks = "Tim Orling " RECIPE_MAINTAINER:pn-python3-pytest = "Tim Orling " RECIPE_MAINTAINER:pn-python3-pytest-runner = "Tim Orling " 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 \ +" From patchwork Fri Jun 2 07:44:18 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: 25036 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 1F94AC77B7A for ; Fri, 2 Jun 2023 07:44:31 +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.7183.1685691866541128155 for ; Fri, 02 Jun 2023 00:44:26 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="signature has expired" header.i=@gmail.com header.s=20221208 header.b=eCNPTZzk; 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-3f6e1394060so16483015e9.3 for ; Fri, 02 Jun 2023 00:44:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1685691865; x=1688283865; 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=/SyIVyly71ItzuFETlScyPcbwi7P2yRK63M5AltfUJU=; b=eCNPTZzkD4O8vBQn8iRLcnNSX5O+FDyI9U+bsF2b++i2t9bPvOfZfUzv6dGiiVlG/3 4S6LTK8r7XzbdZyzUPPmopMaUX2IL3eZ21uKR8CDaSx6q5Qoo5Br84Gx/UcQ3S4AhzkF pj2L+QvOZE/3JhKstrIF/5wU1NMJCGhB166U5PT1rIaNEZU2LpCKTX9dpHIahOhgiqZ+ dbGPwMmou1h+Hg70gpLr5vnVMcLQL07Ew1jZqwRRG3ApsNkQfIAFnrkPBn1T0ScVQoTI NQ1AAUKcdv7FRwKsOfr7G9sa72uAlfR/NVf8MXSGTMRsQjfGAghYa6f8TFHH+zvm9elP hF2A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685691865; x=1688283865; 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=/SyIVyly71ItzuFETlScyPcbwi7P2yRK63M5AltfUJU=; b=A0XXpLA+rnNcEO8CXdaNt5fGBPIKeEJLpaMzteWGSo3nDbglp8w1ndxe8CDbydRNrg FUALmLvMCe0jOVMxqUHcaktWsTgAZcu6iXQd9Lmue2TwSLNKAdqgoAc97UMwUVXfmOxh q6EJN5YYF7KJUB2rXzhp30SuYFL+9HZrn6Fgr8vI630iPbVhNAsqbAlw/2/dKds4eNGN H3x9Z5CI7HD7EuVri9N058xcZqXzEP8wvSx5SqlzIvl65bd95feCBLFfWfz8WDaQNtqE znmX9oPk5ZJKLqN/JKBsUuulyS0aA+4fj/lmY3tfDZGyoOH/mokhb5mrmbDq7vRyHBUe jEdQ== X-Gm-Message-State: AC+VfDyvjOdeZ7zBZmnBhS/BlPcdpEXVFSHibJz4d5iptZ1i1fwG7Lib bPhXRVlDRVobD3xANUHvF2j6kNwPXdg= X-Google-Smtp-Source: ACHHUZ7JiQguz3sqi6mJb44FgT7bQPm2SOjF4kJ5+vUYz10TNDN7FErG0xg/eY96hPtn8LnX/sJdhg== X-Received: by 2002:a1c:4c1a:0:b0:3f6:119:ee11 with SMTP id z26-20020a1c4c1a000000b003f60119ee11mr1151053wmf.32.1685691864528; Fri, 02 Jun 2023 00:44:24 -0700 (PDT) Received: from localhost.lan (dsl51B7D2F9.fixip.t-online.hu. [81.183.210.249]) by smtp.gmail.com with ESMTPSA id v6-20020a05600c214600b003f607875e5csm4596225wml.24.2023.06.02.00.44.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Jun 2023 00:44:24 -0700 (PDT) From: =?utf-8?b?Wm9sdMOhbiBCw7ZzesO2cm3DqW55aQ==?= To: openembedded-core@lists.openembedded.org Cc: Alexander Kanavin , Alexandre Belloni , =?utf-8?b?Wm9sdMOhbiBC?= =?utf-8?b?w7ZzesO2cm3DqW55aQ==?= Subject: [PATCH 2/3] python3-meson-python: New recipe Date: Fri, 2 Jun 2023 09:44:18 +0200 Message-Id: <20230602074419.2450399-2-zboszor@gmail.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230602074419.2450399-1-zboszor@gmail.com> References: <20230602074419.2450399-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 ; Fri, 02 Jun 2023 07:44:31 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/182147 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 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 " 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" From patchwork Fri Jun 2 07:44:19 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: 25034 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 20AA4C7EE24 for ; Fri, 2 Jun 2023 07:44:31 +0000 (UTC) Received: from mail-wm1-f43.google.com (mail-wm1-f43.google.com [209.85.128.43]) by mx.groups.io with SMTP id smtpd.web11.7186.1685691866948854114 for ; Fri, 02 Jun 2023 00:44:27 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="signature has expired" header.i=@gmail.com header.s=20221208 header.b=ZK75+WOW; spf=pass (domain: gmail.com, ip: 209.85.128.43, mailfrom: zboszor@gmail.com) Received: by mail-wm1-f43.google.com with SMTP id 5b1f17b1804b1-3f6d7abe934so16473885e9.2 for ; Fri, 02 Jun 2023 00:44:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1685691865; x=1688283865; 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=H/49Xjj7g0KGr6mzQb2M+nd8WQXO/9VdM4cxbpnHsoY=; b=ZK75+WOWnRZqVos36o3DjfCXaXnVZAqsQmb74Jkpm4qXeMXWyxmTb8bKJHu2ykmajy kWrdgYeqMEgiEwgYvGxYWqh++fNg40on6iN/DRP1t+Kjt2wZrYWoQVTQeiBSrp2NydC5 SxAZenDAqnPSEkkdqH1icNcd0ffAzMxHXtbaYTJhqM8NxzZklsE+LRutXn2YAumcndq2 nKR7gomkAuNa7dY0FfQsbVHzQIaLOTZxDvezWfkdbo5FdY9u1yw5gl98u7Tp84Gs4l/Y 1jH5xZGiD1hnBP9XFmFsx7O/T5RIOO7BaHOFhugzoKkSGCmzyxvvcDnZ1vttGS9u58a+ Ci4g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685691865; x=1688283865; 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=H/49Xjj7g0KGr6mzQb2M+nd8WQXO/9VdM4cxbpnHsoY=; b=lE+EV+rpUG3QYaQtZqmXPi38WfzFOLNQO5bFwzDlleAsBcEJ8ToZA6irAUsn7Rv2lA yUhL/f/LnVDL6d08WnFZGU7XxzsZoDpUyTqsJiGarWVG5gWSYN51CDzhc5XPgwNgakQ+ 1hDA1Wt7jknC9HH9QMSPXMt2z7uCG9Ey2RZvX5bCc8Dr9ICO8FzVt0Mpa8cQKfQxPTep aCFYivYR+2m4YAtax8ty/tmDwPBat2Rw9CsDic/Wny/tXmF0N+9GT+izZcRLi0/36Gyq qHPfbhsHjJse1TXYKcbofL0fqVVVMvk9e9NpKP1EEFfcaGgITo1Repfms0axwtChcc4k Z95w== X-Gm-Message-State: AC+VfDzksMZ/s1QHyVPAuCO6qMJxZCB1rn4f/omNBFiYOdt7xmSigG1P kIjFfseCivghF0ug9lv34XkqgTak0F4= X-Google-Smtp-Source: ACHHUZ6+n5oewkMYZ6wBsDPuZzcEVJ7aysjfTPEkXN1JqUCJEHPMboUkEeiZ5lVuXfWCzYB/8TnUFw== X-Received: by 2002:a05:600c:292:b0:3f4:e853:6a1 with SMTP id 18-20020a05600c029200b003f4e85306a1mr1360254wmk.38.1685691865118; Fri, 02 Jun 2023 00:44:25 -0700 (PDT) Received: from localhost.lan (dsl51B7D2F9.fixip.t-online.hu. [81.183.210.249]) by smtp.gmail.com with ESMTPSA id v6-20020a05600c214600b003f607875e5csm4596225wml.24.2023.06.02.00.44.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Jun 2023 00:44:24 -0700 (PDT) From: =?utf-8?b?Wm9sdMOhbiBCw7ZzesO2cm3DqW55aQ==?= To: openembedded-core@lists.openembedded.org Cc: Alexander Kanavin , Alexandre Belloni , =?utf-8?b?Wm9sdMOhbiBC?= =?utf-8?b?w7ZzesO2cm3DqW55aQ==?= Subject: [PATCH 3/3] python_mesonpy: New class Date: Fri, 2 Jun 2023 09:44:19 +0200 Message-Id: <20230602074419.2450399-3-zboszor@gmail.com> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230602074419.2450399-1-zboszor@gmail.com> References: <20230602074419.2450399-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 ; Fri, 02 Jun 2023 07:44:31 -0000 X-Groupsio-URL: https://lists.openembedded.org/g/openembedded-core/message/182148 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