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)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id A9F05158041 for ; Tue, 20 Feb 2024 06:36:09 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 0189D2BC0AD; Tue, 20 Feb 2024 06:35:13 +0000 (UTC) Received: from mail-oi1-x235.google.com (mail-oi1-x235.google.com [IPv6:2607:f8b0:4864:20::235]) (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 B8A6D2BC0AA for ; Tue, 20 Feb 2024 06:35:12 +0000 (UTC) Received: by mail-oi1-x235.google.com with SMTP id 5614622812f47-3c0485fc8b8so4161333b6e.3 for ; Mon, 19 Feb 2024 22:35:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1708410911; x=1709015711; darn=lists.gentoo.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:from:to:cc:subject:date:message-id :reply-to; bh=GmTEJVijbumWdatX0VN80y/TRnXNufUpobOJTghtxg0=; b=Jur425kB/dwUsyAIPi3+psWJalHzq4aEC3x+LG3zwzuQwnWQLBv9MwV6Q6Fr73UPrg wrE5o6U7EYDu/iPMtEh7DxG9YPzFDPyzfbrI6UefjKT/ccURbrLlWamN77X/ISp7zE5q 8tskGFS4AsSph9yawzZ9aif2DF9UUNPGc9fEr5gP1pwTujhNnR3UPOHAInNeQb36YmNp VoCfw5R6WJr/Fd3aVsn6Aa/nhpBWbcAZpasPPcTjODcZsm/vhzZq3qkPnXZlQ/JyiiSN bZH/EEl/3Uk8YnfiA+ra024xisb+Bnz11BrhfTmOb5/dKhKkqpDA/lAOpxS8IPjn9xGf zWsA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708410911; x=1709015711; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=GmTEJVijbumWdatX0VN80y/TRnXNufUpobOJTghtxg0=; b=huyCosaCSPP0IaQUwjFSgmtOprIm7mUVpXD0xcYotR9LtH66xnr7I6AUAmJfj/xwcH Xu6gy1tLnoJn34BisB6yJ6HUuqOqkPDGV8eyeYamOC4Eismw+bUABlhWSUC5Gln5PgT8 uhiLb1TjJeHyyvkKvGUZky2CxbjlWBF/U6hNEp1YNw+AnV3QAaVCe+LphYttxmiAQUfm XgYTad4CI/AVBLFyxDWntkSMLG9PwTJLN2TUdSnSFxYFW1OZEmdC/gIlg3Hl0dxXNBm6 i5TQdp0JdTvXocenELt7keE/zO1umAA2dIOGVLpASTaQhZwktsBSL/5hUAhEIRYqfTOL gKJg== X-Gm-Message-State: AOJu0YyZ/KSQFcClNITMZUucHqsqCZhpOrb330yOJp94YzC6nQ6AbG5p Af0axAQ363QktZUnl2/MdKE+ueIG4/JMGon3jGUvF8qbIomil+Xl0dDCoAes X-Google-Smtp-Source: AGHT+IHC7eWC+MxpEwrJ7kj2Oh48hHFgZ1kAs57ipQo/CHCw4pfjrsVD4WwaotPjCMAop+eMfu6xyA== X-Received: by 2002:a05:6808:220f:b0:3bf:db98:8674 with SMTP id bd15-20020a056808220f00b003bfdb988674mr17429977oib.27.1708410911285; Mon, 19 Feb 2024 22:35:11 -0800 (PST) Received: from acleverhostname.attlocal.net (108-200-163-197.lightspeed.bcvloh.sbcglobal.net. [108.200.163.197]) by smtp.gmail.com with ESMTPSA id a14-20020a05680802ce00b003c15d61ec3fsm461475oid.37.2024.02.19.22.35.10 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Feb 2024 22:35:10 -0800 (PST) From: Eli Schwartz To: gentoo-dev@lists.gentoo.org Subject: [gentoo-dev] [PATCH v2 4/5] distutils-r1.eclass: wire up meson-python to meson.eclass Date: Tue, 20 Feb 2024 01:14:44 -0500 Message-ID: <20240220063504.3959739-5-eschwartz93@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240220063504.3959739-1-eschwartz93@gmail.com> References: <1b9b73ea-9895-4680-aab7-117e47c9cc36@gmail.com> <20240220063504.3959739-1-eschwartz93@gmail.com> Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Archives-Salt: 08d8656a-3993-4b1d-9929-472ab7d76405 X-Archives-Hash: 720996b2b0ccac9acaff4eec7fcdace3 The meson-python build backend -- as the name suggests -- uses meson under the hood. We have a meson eclass which does lots of useful things pertinent to meson. Make sure it gets invoked, by prying out the options that meson_src_configure would use and setting passing them as our seed values for gpep517. Signed-off-by: Eli Schwartz --- v2: call setup_meson_src_configure instead of meson_src_configure. This avoids running `meson setup` twice, and guarantees we use whatever settings the PEP517 backend requires. In particular, it respects numpy's vendored meson fork with experimental new features. eclass/distutils-r1.eclass | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass index c0d1992ccce0..a42adc182ed9 100644 --- a/eclass/distutils-r1.eclass +++ b/eclass/distutils-r1.eclass @@ -197,6 +197,10 @@ _DISTUTILS_R1_ECLASS=1 inherit flag-o-matic inherit multibuild multilib multiprocessing ninja-utils toolchain-funcs +if [[ ${DISTUTILS_USE_PEP517} = meson-python ]]; then + inherit meson +fi + if [[ ! ${DISTUTILS_SINGLE_IMPL} ]]; then inherit python-r1 else @@ -1386,9 +1390,11 @@ distutils_pep517_install() { ) ;; meson-python) + local mesonargs=() + setup_meson_src_configure "${DISTUTILS_ARGS[@]}" local -x NINJAOPTS=$(get_NINJAOPTS) config_settings=$( - "${EPYTHON}" - "${DISTUTILS_ARGS[@]}" <<-EOF || die + "${EPYTHON}" - "${mesonargs[@]}" <<-EOF || die import json import os import shlex -- 2.43.0