From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id 0M1CLs2MzmNFdwAAbAwnHQ (envelope-from ) for ; Mon, 23 Jan 2023 14:34:05 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id COx5Lc2MzmPmCQEAG6o9tA (envelope-from ) for ; Mon, 23 Jan 2023 14:34:05 +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 8FF3AF7DB for ; Mon, 23 Jan 2023 14:34:05 +0100 (CET) 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 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-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1674480845; 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=aR3Cd32jsIpB/qaZMl46CjT9HybJqzHaQfNriE3Hl+k=; b=Zvox5OKeTyJRJKukJe++xbbfsZNYSd/dw5cP16iTWFDQSNViO2sI9Nq4d0k0NQ/5ZWkwW+ iF1/I3DJtvQdw4lS3XIyO0iMp6Mji+EDLtUcdLJn+wYOB3TzOlW6ILrdHhmRLAZQJPCPDV sKGrNIppad0htQtnmaBqQREq85W7WJP64tglQ7kuqqMC/7+7AqLqYl0Nqr2inGt69myGdI 3gLE8FHWvrueCW4IFwZBrPVjz9+SIdCCeY0KlK863uyejqlhL3L0SO5gkqBgU4umOCQkx+ 2OkORmZxDP3B6uYZw5rOpR/WW35G5qLCAg1chE0kzazQ5MtDHeVL5QMveE+W2Q== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=W0mpxJoL; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); 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" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1674480845; a=rsa-sha256; cv=none; b=d9/cJudcnu9UgYXAaBYCYcRJ/aYrKeEC7losY3Dtxr3up6ZX7SG7S49NugoWbZUAJpfnnv KBDVXMeGPcA7BKY23dR7enIGUg2UgqMce4b+I4XV2+P9T71HALcL/eur5z8WdRmSZLX1lg /S0gy6yhEbqOA7CdKj1DwqFqbHTf+C9fmPdGYJOCQvqlLN/5CHMOgz1AzIcJvstkNOx5pK gvnEV/WfRyDOA3KLm+6XsmFXOog1YTlMqdY9QhZwsAYGtiWgJEoPlTsZjjTol1uYfMmbGz LYbkhmV4XKrKE2vH5QWi4m5jYJOmT6umiv3gL8/gJbaQe2klY1NZrr4UdrXBrQ== Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=W0mpxJoL; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); 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" X-Migadu-Spam-Score: 0.02 X-Spam-Score: 0.02 X-Migadu-Queue-Id: 8FF3AF7DB X-Migadu-Scanner: scn1.migadu.com X-TUID: wAcRF09OhznU 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 -- 2.39.1