From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id 3RcuHJvaxGOzgQEAbAwnHQ (envelope-from ) for ; Mon, 16 Jan 2023 06:03:23 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id MIBrG5vaxGP6lQAAauVa8A (envelope-from ) for ; Mon, 16 Jan 2023 06:03:23 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 2DF283A709 for ; Mon, 16 Jan 2023 06:03:23 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pHHeK-00075D-4j; Mon, 16 Jan 2023 00:03:12 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pHHeF-000753-ID for guix-patches@gnu.org; Mon, 16 Jan 2023 00:03:07 -0500 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pHHeA-00039R-Ld for guix-patches@gnu.org; Mon, 16 Jan 2023 00:03:07 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pHHeA-0004Lx-Dw for guix-patches@gnu.org; Mon, 16 Jan 2023 00:03:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#60847] [PATCH 0/1] Enable cross-compilation for the pyproject-build-system References: <20230116040402.7350-1-maxim.cournoyer@gmail.com> In-Reply-To: <20230116040402.7350-1-maxim.cournoyer@gmail.com> Resent-From: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 16 Jan 2023 05:03:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60847 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 60847@debbugs.gnu.org Cc: Josselin Poiret , Tobias Geerinckx-Rice , Maxim Cournoyer , Simon Tournier , Mathieu Othacehe , Ludovic =?UTF-8?Q?Court=C3=A8s?= , Christopher Baines , Lars-Dominik Braun , Ricardo Wurmus , jgart Received: via spool by 60847-submit@debbugs.gnu.org id=B60847.167384532816664 (code B ref 60847); Mon, 16 Jan 2023 05:03:02 +0000 Received: (at 60847) by debbugs.gnu.org; 16 Jan 2023 05:02:08 +0000 Received: from localhost ([127.0.0.1]:60145 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pHHdI-0004Ki-A0 for submit@debbugs.gnu.org; Mon, 16 Jan 2023 00:02:08 -0500 Received: from mail-qt1-f173.google.com ([209.85.160.173]:37393) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pHHdH-0004KG-0d for 60847@debbugs.gnu.org; Mon, 16 Jan 2023 00:02:07 -0500 Received: by mail-qt1-f173.google.com with SMTP id j9so1099029qtv.4 for <60847@debbugs.gnu.org>; Sun, 15 Jan 2023 21:02:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=U6sCICU/tnz7NkBthC8kkkSm6LX0KB4Rb1TZvcBA8I4=; b=olFmQEVPjGkNdHZvOyVAZpLmDx1Iiwpd34HGCo7O+2nr/SaYsKOdcToz33LyGh7Dyk rrqfcuIg4icxGH4CvYYl4azOlKEc8kfVF8n2Z3Hs8pAQFur1rqwpL+SMD1EGiQI0+dx2 0QoINXk6kfdfi0DGHIouzlNDf8hLwOFmzeXdRl+P9iAdhpCJci0L5D64m/eWwDhurI+x ZxE3NtI+wZVHI2HG0qNrGZkOVErq2YHh1bZoyvD8AiP4xzz2tnN/oPEPODjx2uK30uFR 0T/p8aVSmkHXyWLGrFOBUVZk8pVPTItlpIS1Nhz9P6XAhRgglU+vt3tvhMWbpty5m2/X L4CA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=U6sCICU/tnz7NkBthC8kkkSm6LX0KB4Rb1TZvcBA8I4=; b=tm7/E588Y+4EBMnOFPTo0ZbE5eQJ0gs0ULfAK5u3kcp2K39ExU37Heawk4f+4EPRCx JeZOfG2vmXo+bxgB1wQyVTZvoO25K41c6mURWRc9gU4cUorRBrla+ZH4+213KktFNLdQ KlojOCWF3w78zv5S4BkULr3JLLsh7Eo50+wSDOdwoHNsjkuQpQWbu0/TXE7gRt0Vvjp/ k9EuLhPBEMn46czv2Tz0k8ssbTK6aR/SfilmqYp/pEcPai6Mzd28i2P7kLH3QfyGnUZb EWm0dYgwrCUqPqCOPLNRPuZQTeCx9nf5KkrAxgkse6LwgWTnWONJ/47L0VFBBBfnI0ft yf8g== X-Gm-Message-State: AFqh2kqjLZNI2x+6QYOC59dmdj0VrxWhu9tby0OxELofwpLHD6NDuudu gFrqSkSvOd/8dD6uhJEylvvlUXZ5ixjhHmyI X-Google-Smtp-Source: AMrXdXtKomLwiYF2hWCRYZ2UE2C9FanZ7v6ESezxeL7tmbMWn058FQm0mDdrHu4OYad+S4pAQfN66w== X-Received: by 2002:ac8:7457:0:b0:3a8:2122:7c28 with SMTP id h23-20020ac87457000000b003a821227c28mr130954331qtr.47.1673845321448; Sun, 15 Jan 2023 21:02:01 -0800 (PST) Received: from localhost.localdomain (dsl-10-130-209.b2b2c.ca. [72.10.130.209]) by smtp.gmail.com with ESMTPSA id ay40-20020a05620a17a800b006f956766f76sm17401318qkb.1.2023.01.15.21.01.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 15 Jan 2023 21:02:01 -0800 (PST) From: Maxim Cournoyer Date: Mon, 16 Jan 2023 00:01:30 -0500 Message-Id: <20230116050132.24313-1-maxim.cournoyer@gmail.com> X-Mailer: git-send-email 2.38.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=olFmQEVP; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none) ARC-Seal: i=1; s=key1; d=yhetil.org; t=1673845403; a=rsa-sha256; cv=none; b=dzxAyRzZpgbWd7prwfGxsUhVhzk1PBmE/dE/5/wFjKDaS+GBqGy3U/R2AmtaUqxSf7NiCM X0IQeq3ENDZjEq5Qm1zhi/yDslSKOcWDpj8fhvJ5O0KQiOL7rilOAbkdnXsFwr48UQ+LmM F/bWcVVdZ3aKyYuVcaogdPkzgUjqJ4afNecYP7BFpWg4J4a07XUb46fthDzQGWtyEHWb9T wVLaH41+yZQZ+WH2BgZzjPQKH3v35fRuBwZl8hlx4jm6oT+GeKxwRQ3wIqSAS15bUU8C4M hMcMuOvzY9yh+4RsAAqKU+afuDLe7Vgks75umDY+pSsQNNal69Ll3r4vMOAQnQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1673845403; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=U6sCICU/tnz7NkBthC8kkkSm6LX0KB4Rb1TZvcBA8I4=; b=eDSrkZ5dLiTpqkkp0LqCiN+sgtxh/Hgati/rCd4SJJyK/ltTsLCP59mDxCsOQN4glRSYRd 5w1dHIDalXcaSXwWpeUoEzoVxUrxrNNjfe03ZOeIjXhxkHXahfWKdxtPPG7SOt4qJzdzwG nOmbbPZ7BMq9jv2kOH+ElSChFlhyqaBDVKj2lWW/DUyHmgzSy5g/2mnxMuAv88hZE68o3L 4irnTVdHV3zK5ABkMYceHQK3emzhtikv5GmlYN0FDFMmTwFLupBSQvp71y1nQ35PldoyPt u4bPFifb2oTFfWg+DRV6MENQGXI3RiKb9/25wXxkb0IaREJr6rv16S8U5p4zgA== X-Migadu-Queue-Id: 2DF283A709 X-Migadu-Scanner: scn0.migadu.com Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=olFmQEVP; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org"; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none) X-Migadu-Spam-Score: -0.52 X-Spam-Score: -0.52 X-TUID: ZHh4PvOmhak2 This change enables cross-compilation for the pyproject-build-system, at the same time paving the way to fix the longstanding bug #25235 (Wrapped python programs get native-inputs in PYTHONPATH), by keeping the distinction between native and host (regular) inputs even when not cross-compiling. A unified builder is used, which departs from the other build systems (which use one builder for the native build and another one for the cross build, where implemented). If this change is accepted, there would be adjustments needed to some of the ~120 Python packages using pyproject (looking for a native inputs now needs to be done using the 'native-inputs' instead of 'inputs' argument even in the native compilation mode). Over time I think it'd make sense to migrate more build systems to use this scheme, since it gives more control as to what inputs go into the wrapper. A demo package, python-pycryptodome, that contains C extensions is adjusted so that it can be cross-compiled using this new build system. It is provided separately as it would need to go to core-updates. Maxim Cournoyer (1): build: Enable cross-compilation for pyproject-build-system. guix/build-system/pyproject.scm | 115 ++++++++++++++--------- guix/build/pyproject-build-system.scm | 126 +++++++++++++++++++++++--- guix/packages.scm | 46 +++++----- 3 files changed, 210 insertions(+), 77 deletions(-) base-commit: 5c921977179489caef4a9e54ada6696fc86d2f0b -- 2.38.1