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 46A6F158041 for ; Tue, 20 Feb 2024 06:56:14 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 82AE82BC073; Tue, 20 Feb 2024 06:56:10 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.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)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 2EA5D2BC015 for ; Tue, 20 Feb 2024 06:56:10 +0000 (UTC) Message-ID: <4778125a70bc6fe74aecac810ae2476e64aefe37.camel@gentoo.org> Subject: Re: [gentoo-dev] [PATCH v2 4/5] distutils-r1.eclass: wire up meson-python to meson.eclass From: =?UTF-8?Q?Micha=C5=82_G=C3=B3rny?= To: gentoo-dev@lists.gentoo.org Date: Tue, 20 Feb 2024 07:55:55 +0100 In-Reply-To: <20240220063504.3959739-5-eschwartz93@gmail.com> References: <1b9b73ea-9895-4680-aab7-117e47c9cc36@gmail.com> <20240220063504.3959739-1-eschwartz93@gmail.com> <20240220063504.3959739-5-eschwartz93@gmail.com> Organization: Gentoo Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-LLxnG90nUy/EgIIX6TCs" User-Agent: Evolution 3.50.4 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 X-Archives-Salt: 6cecfc90-94da-4e43-8254-fd446cee21a9 X-Archives-Hash: e4bcd5bc8b7c1f43badab0c7ffaee9d2 --=-LLxnG90nUy/EgIIX6TCs Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Tue, 2024-02-20 at 01:14 -0500, Eli Schwartz wrote: > 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. >=20 > Signed-off-by: Eli Schwartz > --- >=20 > 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. >=20 > eclass/distutils-r1.eclass | 8 +++++++- > 1 file changed, 7 insertions(+), 1 deletion(-) >=20 > 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=3D1 > inherit flag-o-matic > inherit multibuild multilib multiprocessing ninja-utils toolchain-funcs > =20 > +if [[ ${DISTUTILS_USE_PEP517} =3D meson-python ]]; then We use '=3D=3D' throughout. > + inherit meson > +fi > + > if [[ ! ${DISTUTILS_SINGLE_IMPL} ]]; then > inherit python-r1 > else > @@ -1386,9 +1390,11 @@ distutils_pep517_install() { > ) > ;; > meson-python) > + local mesonargs=3D() > + setup_meson_src_configure "${DISTUTILS_ARGS[@]}" > local -x NINJAOPTS=3D$(get_NINJAOPTS) > config_settings=3D$( > - "${EPYTHON}" - "${DISTUTILS_ARGS[@]}" <<-EOF || die > + "${EPYTHON}" - "${mesonargs[@]}" <<-EOF || die > import json > import os > import shlex --=20 Best regards, Micha=C5=82 G=C3=B3rny --=-LLxnG90nUy/EgIIX6TCs Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- iQFGBAABCgAwFiEEx2qEUJQJjSjMiybFY5ra4jKeJA4FAmXUTPsSHG1nb3JueUBn ZW50b28ub3JnAAoJEGOa2uIyniQOFn0H/1XNLHtJHp2OQS8xn+Y1cAq9PwgbAr7I zvCl0ho0On1qeiNMSjLwzkvoPWZDbBzNFaZSbgZYjqDCzOuT40b/w0Vsz9L+kn1y YQXYIZgnyWo4VBBNjmkloDggMqKKFz4g5R2/KG+tdgLowOVdA3ZYTKK8I1gmc7lu D9rSkgq5xnafFWYUKJMrk4VSE1mdpE31T8sZlcX40xfFgObwDPRFZUVIIKE3Hcac O8x6hcQkuKRrZYr/WNI0NpmCn2ExTm2tEVemoS+Pfq8y6eWpRuGJo/+8Vow3BDFx rbbQoyBB0+st9LDOh3Mmgoql6sJ/SbNGsbv42l4FURxZg4bn7mZHf2M= =DyEa -----END PGP SIGNATURE----- --=-LLxnG90nUy/EgIIX6TCs--