From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 61ED415ACFB for ; Mon, 24 Apr 2023 07:25:15 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 90916E0E14; Mon, 24 Apr 2023 07:25:14 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 77CAFE0E14 for ; Mon, 24 Apr 2023 07:25:14 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 7B6DD33BE2E for ; Mon, 24 Apr 2023 07:25:13 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id B8B95A49 for ; Mon, 24 Apr 2023 07:25:11 +0000 (UTC) From: "Michał Górny" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Michał Górny" Message-ID: <1682321104.84f8159eaceb84c3df83f525a3663496f3800a97.mgorny@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: eclass/ X-VCS-Repository: repo/gentoo X-VCS-Files: eclass/distutils-r1.eclass X-VCS-Directories: eclass/ X-VCS-Committer: mgorny X-VCS-Committer-Name: Michał Górny X-VCS-Revision: 84f8159eaceb84c3df83f525a3663496f3800a97 X-VCS-Branch: master Date: Mon, 24 Apr 2023 07:25:11 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: fb363309-0c4d-4ff1-ae8f-d47e7580f473 X-Archives-Hash: 19c08d9f9cf2554d04750579d0abf1ac commit: 84f8159eaceb84c3df83f525a3663496f3800a97 Author: Michał Górny gentoo org> AuthorDate: Mon Apr 24 06:35:44 2023 +0000 Commit: Michał Górny gentoo org> CommitDate: Mon Apr 24 07:25:04 2023 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=84f8159e distutils-r1.eclass: Fix support for >=meson-python-0.13.0 Closes: https://bugs.gentoo.org/904677 Signed-off-by: Michał Górny gentoo.org> eclass/distutils-r1.eclass | 51 ++++++++++++++++++++++++++++++---------------- 1 file changed, 34 insertions(+), 17 deletions(-) diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass index cef9d71e5593..4346a86c2097 100644 --- a/eclass/distutils-r1.eclass +++ b/eclass/distutils-r1.eclass @@ -1316,23 +1316,40 @@ distutils_pep517_install() { case ${DISTUTILS_USE_PEP517} in meson-python) local -x NINJAOPTS=$(get_NINJAOPTS) - config_settings=$( - "${EPYTHON}" - "${DISTUTILS_ARGS[@]}" <<-EOF || die - import json - import os - import shlex - import sys - - ninjaopts = shlex.split(os.environ["NINJAOPTS"]) - print(json.dumps({ - "setup-args": sys.argv[1:], - "compile-args": [ - "-v", - f"--ninja-args={ninjaopts!r}", - ], - })) - EOF - ) + if has_version -b '>=dev-python/meson-python-0.13'; then + config_settings=$( + "${EPYTHON}" - "${DISTUTILS_ARGS[@]}" <<-EOF || die + import json + import os + import shlex + import sys + + ninjaopts = shlex.split(os.environ["NINJAOPTS"]) + print(json.dumps({ + "setup-args": sys.argv[1:], + "compile-args": ["-v"] + ninjaopts, + })) + EOF + ) + else + config_settings=$( + "${EPYTHON}" - "${DISTUTILS_ARGS[@]}" <<-EOF || die + import json + import os + import shlex + import sys + + ninjaopts = shlex.split(os.environ["NINJAOPTS"]) + print(json.dumps({ + "setup-args": sys.argv[1:], + "compile-args": [ + "-v", + f"--ninja-args={ninjaopts!r}", + ], + })) + EOF + ) + fi ;; setuptools) if [[ -n ${DISTUTILS_ARGS[@]} ]]; then