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 2B0EF158041 for ; Tue, 20 Feb 2024 06:35:12 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id C0A3D2BC07B; Tue, 20 Feb 2024 06:35:08 +0000 (UTC) Received: from mail-oi1-x22e.google.com (mail-oi1-x22e.google.com [IPv6:2607:f8b0:4864:20::22e]) (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 6591A2BC073 for ; Tue, 20 Feb 2024 06:35:08 +0000 (UTC) Received: by mail-oi1-x22e.google.com with SMTP id 5614622812f47-3bbd6ea06f5so2567098b6e.1 for ; Mon, 19 Feb 2024 22:35:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1708410906; x=1709015706; 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=6EICyJ7FKtWStfbBDg/ba8Ok/nz5waYZ06y8dnpZ2ps=; b=HznnfFp7GGIJ2n/VdhIRcUEARRnb2H/FxJfyDQPhai6AWlIVLZmMQcel1jxnd6JD28 mSNxChNylK7RD2s8qXUbotlsa9jyr0eUWZUlohaRNHjNAjUvSJ3N6i9+2RqZh8ML4tty CqLpp7JrU01pyWlEUJBbxIVPU5AVZtQd0MfuZ5GJ/2Gmvph7oNOmcgIsJyLRPPZvTWAM KW6UFo0lZDl+pd7ZBEifr2VqaE+ElC2RDLzOMFo/NguIuPJghGfWkqVANMpF7W244wZm f0OLeINY860XO1hnJvNr56IRos9tXU9xgx4fk3qzRHYsSi6+zesM6U0gGRJ2R6rYzkb0 jfZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708410906; x=1709015706; 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=6EICyJ7FKtWStfbBDg/ba8Ok/nz5waYZ06y8dnpZ2ps=; b=vYzaKm6pLu5U4qlbthWlAOM812xB/G1TDrQ8XLHTKcTTFgoChAnH1bflHDOU5O3dY7 boe6CtZHZ+uv1ozwH+VI88pxmkqSJgb9kT/Mw6aZz+Wd2OqjG/q0E+VdNWh+ZuWhISVN MKM74pAAm0xKOAFOTzmVmQzap3vrS9rrohFVwkdB0asLYjM1aexw2IFWXn30oTR8nU9Y 7v1QhTqbQDwQi2jDYcsGONxoZ3E7J/OkJKWwO2jp6D9AuLfyT5cXkRMRmQYgFHYNu4X6 g+k6giCYH0oR8rJ/hoxSB1kxtL23S4ktt8TAiYGvoxFblPAtbRCN+amktwHsUaj+HkaN 6hcA== X-Gm-Message-State: AOJu0YzUREokQhcbg5c0gGrrpnPmRhAu/q4fElKoOtQXewj+hnNYjYLY X8omaSUNqFSbgnoNtQj158yKQtr5OxsAGaNOuZ9mYvZkmq+VpoOtqGNSp0AU X-Google-Smtp-Source: AGHT+IEgYNu+wrvVXDU6WATuq0smy7yrUEPcXS+tWzo7P0q3vVu54hgg6hu47DqEL7bMDvJhK0Wp4A== X-Received: by 2002:a05:6808:1a13:b0:3c1:5d37:2801 with SMTP id bk19-20020a0568081a1300b003c15d372801mr1597251oib.4.1708410905739; Mon, 19 Feb 2024 22:35:05 -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.05 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Feb 2024 22:35:05 -0800 (PST) From: Eli Schwartz To: gentoo-dev@lists.gentoo.org Subject: [gentoo-dev] [PATCH v2 0/5] eclass updates for meson <> distutils <> LTO Date: Tue, 20 Feb 2024 01:14:40 -0500 Message-ID: <20240220063504.3959739-1-eschwartz93@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <1b9b73ea-9895-4680-aab7-117e47c9cc36@gmail.com> References: <1b9b73ea-9895-4680-aab7-117e47c9cc36@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: 937cece3-26c2-4de5-9414-15e2eb683046 X-Archives-Hash: af7c52599b9242594ff5e17a9db7fe53 v2 answers the question: how to deal with accumulated mesonargs without actually *running* meson_src_configure before gpep517 Eli Schwartz (5): meson.eclass: wire up LTO support directly into the meson options meson.eclass: prefer -D buildtype instead of --buildtype meson.eclass: refactor src_configure into a setter function distutils-r1.eclass: wire up meson-python to meson.eclass distutils-r1.eclass: fix src_configure to handle flag-o-matic correctly eclass/distutils-r1.eclass | 13 ++++-- eclass/meson.eclass | 85 +++++++++++++++++++++++++++----------- 2 files changed, 70 insertions(+), 28 deletions(-) Range-diff against v1: 1: aac9d1516675 = 1: aac9d1516675 meson.eclass: wire up LTO support directly into the meson options -: ------------ > 2: cf98596d9bd1 meson.eclass: prefer -D buildtype instead of --buildtype -: ------------ > 3: 7ac90f1b2d88 meson.eclass: refactor src_configure into a setter function 2: bcbec23f5c76 ! 4: e8387e8dec72 distutils-r1.eclass: wire up meson-python to meson.eclass @@ Commit message 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. + 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 @@ eclass/distutils-r1.eclass: distutils_pep517_install() { ) ;; meson-python) -+ meson_src_configure "${DISTUTILS_ARGS[@]}" ++ local mesonargs=() ++ setup_meson_src_configure "${DISTUTILS_ARGS[@]}" local -x NINJAOPTS=$(get_NINJAOPTS) config_settings=$( - "${EPYTHON}" - "${DISTUTILS_ARGS[@]}" <<-EOF || die -@@ eclass/distutils-r1.eclass: distutils_pep517_install() { - ninjaopts = shlex.split(os.environ["NINJAOPTS"]) - print(json.dumps({ - "builddir": "${BUILD_DIR}", -- "setup-args": sys.argv[1:], - "compile-args": ["-v"] + ninjaopts, - })) - EOF +- "${EPYTHON}" - "${DISTUTILS_ARGS[@]}" <<-EOF || die ++ "${EPYTHON}" - "${mesonargs[@]}" <<-EOF || die + import json + import os + import shlex -: ------------ > 5: a30c280f4573 distutils-r1.eclass: fix src_configure to handle flag-o-matic correctly -- 2.43.0