From patchwork Mon Jan 16 05:01:30 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxim Cournoyer X-Patchwork-Id: 1202 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id B00A827BBEB; Mon, 16 Jan 2023 05:03:23 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 3502227BBE9 for ; Mon, 16 Jan 2023 05:03:23 +0000 (GMT) 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 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+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches 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