From patchwork Mon Jan 23 13:32:15 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxim Cournoyer X-Patchwork-Id: 1218 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 C309827BBED; Mon, 23 Jan 2023 13:34:06 +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 EB03627BBEB for ; Mon, 23 Jan 2023 13:34:05 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pJwwh-00025P-3j; Mon, 23 Jan 2023 08:33:11 -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 1pJwwY-00020B-Kf for guix-patches@gnu.org; Mon, 23 Jan 2023 08:33:06 -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 1pJwwY-0001NV-AF for guix-patches@gnu.org; Mon, 23 Jan 2023 08:33:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pJwwX-0000pD-QD for guix-patches@gnu.org; Mon, 23 Jan 2023 08:33:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#60847] [PATCH v2 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, 23 Jan 2023 13:33:01 +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 , ludo@gnu.org, Christopher Baines , Lars-Dominik Braun , Ricardo Wurmus , jgart Received: via spool by 60847-submit@debbugs.gnu.org id=B60847.16744807573129 (code B ref 60847); Mon, 23 Jan 2023 13:33:01 +0000 Received: (at 60847) by debbugs.gnu.org; 23 Jan 2023 13:32:37 +0000 Received: from localhost ([127.0.0.1]:53655 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pJww9-0000oO-8r for submit@debbugs.gnu.org; Mon, 23 Jan 2023 08:32:37 -0500 Received: from mail-yb1-f170.google.com ([209.85.219.170]:39710) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pJww7-0000oA-9a for 60847@debbugs.gnu.org; Mon, 23 Jan 2023 08:32:35 -0500 Received: by mail-yb1-f170.google.com with SMTP id 123so14735285ybv.6 for <60847@debbugs.gnu.org>; Mon, 23 Jan 2023 05:32:35 -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=aR3Cd32jsIpB/qaZMl46CjT9HybJqzHaQfNriE3Hl+k=; b=W0mpxJoLwEM2dov2UvhXAO2XNjtHRvyFPtKltKfdD7jRkcs97N1cjfLQIiXNwVEPvd g4S2ctfCOZpIKygFZHUGFlJIEfvU7drl5b1ROIN5EQkyBYY2BP8zDCbDDmVmOwACSO5B hHyCYhKfBbmpH8dtBz818T+fNB83f9ok4OQ5wzdgyHzCl7pAdgOicuZ6/OxtCb7DpwCg xLmNt+utlN0qkVLnaQNeGcVuMdnESAZF6vfvGxcydBQYAs3GiILCUAqYkRpibVHUg243 uPBbpo7wlSZ/fNstrVdLNDP1/HehR4ImBIQf6A4YQAGP/O2EN0R2mxJ4Pnrl7zun33PE 8Wkg== 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=aR3Cd32jsIpB/qaZMl46CjT9HybJqzHaQfNriE3Hl+k=; b=amuFKiiy1Jqc5dQDf9Poghlx71jubpljX1hbPtf9qoqgVNfrfM1qeyUvi0798Hd4wA mBuXYVsVVNJP20imf/Am2ekOFOPyHBXrPX7CM2fWwBbxH9sTfiSr1oIbSO4dasamxuJX 2SGQ3cjdc040GCDdVUD6kpUDbShydPaTfpEi9PgZs5QV7K8PboMMlak1V2HyyqN2mSkq QdbJXHbHgD6KsSeZ94PbO5FvdWO9jD3lSHQ+hnbXAmOSliBQmW/XKnVxJDkKsevlmMDD v6MnN8ymddoL06HeZ8S30aETvjEEaGKZhmk3TGr67NG4dLfGwCfyU1A1y7o04+L0KzCj vA1g== X-Gm-Message-State: AFqh2kqecXwbYsYN7YCfPp7duwoUzZls+3aAz+usMLBT80jXwVA4FcAP COO6yFrokuxUgGWk25z5XF5LEOsT8CGNmLPJ X-Google-Smtp-Source: AMrXdXt/fPl3Zf51jOJWCkhPFcJ5JplzkE+ZhjOKNeON/JZxo2YQdj8H20Zh0Vc8UmrIYWTS4mGaWg== X-Received: by 2002:a25:5ec2:0:b0:7ff:b107:d3db with SMTP id s185-20020a255ec2000000b007ffb107d3dbmr8985781ybb.19.1674480749412; Mon, 23 Jan 2023 05:32:29 -0800 (PST) Received: from localhost.localdomain ([2607:fad8:4:3::1001]) by smtp.gmail.com with ESMTPSA id h4-20020a05620a244400b00706adbdf8b8sm11718274qkn.83.2023.01.23.05.32.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 23 Jan 2023 05:32:28 -0800 (PST) From: Maxim Cournoyer Date: Mon, 23 Jan 2023 08:32:15 -0500 Message-Id: <20230123133217.318-1-maxim.cournoyer@gmail.com> X-Mailer: git-send-email 2.39.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. Changes in v2: - Rebase 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: 3a1b18aa4540e6f96ded0a98dd907a8033262582