From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id sE+xCGIs7WFqTQEAgWs5BA (envelope-from ) for ; Sun, 23 Jan 2022 11:22:26 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id OIp+BWIs7WGfDgEAauVa8A (envelope-from ) for ; Sun, 23 Jan 2022 11:22:26 +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 7E2DFA63C for ; Sun, 23 Jan 2022 11:22:25 +0100 (CET) Received: from localhost ([::1]:36938 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nBa0t-0003vG-2o for larch@yhetil.org; Sun, 23 Jan 2022 05:22:23 -0500 Received: from eggs.gnu.org ([209.51.188.92]:45630) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nBa0c-0003v7-2f for guix-patches@gnu.org; Sun, 23 Jan 2022 05:22:06 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:45683) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nBa0Y-000596-LP for guix-patches@gnu.org; Sun, 23 Jan 2022 05:22:05 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nBa0Y-00044X-B9 for guix-patches@gnu.org; Sun, 23 Jan 2022 05:22:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#46848] [PATCHES] [core-updates] PEP 517 python-build-system Resent-From: Lars-Dominik Braun Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 23 Jan 2022 10:22:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 46848 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Maxim Cournoyer Cc: 46848@debbugs.gnu.org Received: via spool by 46848-submit@debbugs.gnu.org id=B46848.164293329415605 (code B ref 46848); Sun, 23 Jan 2022 10:22:02 +0000 Received: (at 46848) by debbugs.gnu.org; 23 Jan 2022 10:21:34 +0000 Received: from localhost ([127.0.0.1]:38586 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nBa05-00043d-MQ for submit@debbugs.gnu.org; Sun, 23 Jan 2022 05:21:33 -0500 Received: from mout-p-101.mailbox.org ([80.241.56.151]:34616) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nBa04-00043O-02 for 46848@debbugs.gnu.org; Sun, 23 Jan 2022 05:21:33 -0500 Received: from smtp102.mailbox.org (smtp102.mailbox.org [IPv6:2001:67c:2050:105:465:1:3:0]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-101.mailbox.org (Postfix) with ESMTPS id 4JhTfs3W1yz9sl0; Sun, 23 Jan 2022 11:21:25 +0100 (CET) X-Virus-Scanned: amavisd-new at heinlein-support.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6xq.net; s=MBO0001; t=1642933281; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=076ctM8sG9BBWoVa8w+krO0Gge6eatZ/+gvKm6RxsWA=; b=lYnLQoLONOcqxf2rML2zUXdobOgy/E+FjGe65If68sHbRMqBUQ/Cii5kyOWB4FMM7869bM FQRT09r+yO88Vy0WikZjj/Ow1DlvA0N3DEaaMWyINR6PCgPvL7+p9nkDb5O6vj1hGJVecW iM7wOu0IH4O9t5W911VWpAcQPEOxgFBSmZ50+86xLMNokRvEnRnHezy4nl0uCGZhk4MH/T H7zIFhlv8jZj8duSKrBZU8NzrrRE13B2HpBZcGk8dJhXpI9PG6gBwFIHmQX52lK67nv0x/ PY7o/e3tXcvLAiEb3GhWU26nJVG+MVGaJvyqgQmGBUp4vsYc1aY66J1aLtO1jw== Date: Sun, 23 Jan 2022 11:21:17 +0100 From: Lars-Dominik Braun Message-ID: References: <87ee4z6mv5.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <87ee4z6mv5.fsf@gmail.com> 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" X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1642933345; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: 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=076ctM8sG9BBWoVa8w+krO0Gge6eatZ/+gvKm6RxsWA=; b=HHlPzQ0Z8RAzCvTL/PSXIBjK2vj5HB/zfXJUrhIT7MnHpSnhLxGWMHFnrM3XXAvO+TEqab CpEm5Tm+NyDXApperUOq5nCyDM9z5J0QtCaPb4/9hbDPTIkOOcXecLzjlCVwkkAiInMOna DM34R9SdI1aikXlwmbaRZD9P378UMmRdOWtPSj0y68FwEVeSRrcSY74623A00bMKdr77wk ndgzwH5b8VOJqGxgAFqhWl2hpOSVPyV+s0nEZLPoBRW2LLxxsZPqd4Sz/HQZBUIAkzfkhB 2q+RKtw22QTN9d50eTEm3PfrBC5pns68wPxDjk+ht1tWHtV2vu+6Y05Msep3gA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1642933345; a=rsa-sha256; cv=none; b=BoqkIyDy5pCk3YxCLO7VaRxSIfMtdbv39VNSmMu2Vsd1+4byEw1NwpTQJxmw6ZLote5ef/ WvLHPkAYBNHs7MPFeFDYBkehshGB11WKFQEzfIQEqKcgtTJjlANpg2gA3zscwHtW4NMhPK CS8/b6ym24OsoRvX26+jKXZ6A5xwObmXGDTsQhK9JMiWMpEWLZ6pB7myz9Gs06LzechNei SSRunum6yhxWpnGfz8TFfFGXZe38KOkMvlTxOgxkwa6RiOv1uU1dtGrf6hwiD+lH2fE39v sYgW8kV1us7Pv0XK5YdwGZm7raDOs9MHf7HNWXmlNyl1siZ5K8tpsPITaBNxyQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=6xq.net header.s=MBO0001 header.b=lYnLQoLO; dmarc=fail reason="SPF not aligned (relaxed)" header.from=6xq.net (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: -3.03 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=6xq.net header.s=MBO0001 header.b=lYnLQoLO; dmarc=fail reason="SPF not aligned (relaxed)" header.from=6xq.net (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-Queue-Id: 7E2DFA63C X-Spam-Score: -3.03 X-Migadu-Scanner: scn0.migadu.com X-TUID: zNfqChyvKe1K Hi Maxim, > Here's a review of patches 1 to 6. thanks for the review. Unfortunately this is not the most recent proposal and I have no way to retract the previous patches. I pushed v3 to the wip-python-pep517 branch, because of the sheer number of patches and so the CI could build it (since it requires a rebuild of the entire rust bootstrap chain). > > + ;; Prefer pytest > > + ;; XXX: support nose > > You can remove this; nose is stale/deprecated. So it’s preferred to replace 'check in cases where python-nose is still in use? > > > + (cond > > + (pytest > > + (begin > > + (format #t "using pytest~%") > > + (invoke pytest "-vv"))) ; XXX: support skipping tests based on name/extra arguments? > > We could have a #:test-command argument to specify an arbitrary command > as a list of strings, such as used by the emacs-build-system; that'd > allow us to avoid overriding the phase just to add a '-k "not > this-test"' or similar. I added #:test-flags in my v3 proposal. > > + ;; But fall back to setup.py, which should work for most > > + ;; packages. XXX: would be nice not to depend on setup.py here? fails > > + ;; more often than not to find any tests at all. Maybe we can run > > + ;; `python -m unittest`? > > + (have-setup-py > > + (begin > > + (format #t "using setup.py~%") > > + (invoke "python" "setup.py" "test" "-v"))) > > As Marius noted, falling back to 'python setup.py test' is not > desirable; it's scheduled to be removed already. Sure, but using `python -m unittest` instead requires some investigation. > > + (define (move-script source destination) > > + "Move executable script file from .data/scripts to out/bin and replace > > +temporary hashbang" > > + (move-data source destination) > > + ;; ZIP does not save/restore permissions, make executable > > + ;; XXX: might not be a file, but directory with subdirectories > > + (chmod destination #o755) > > + (substitute* destination (("#!python") python-hashbang))) > > It seems the directory case should be handled? Otherwise the > substitute* call would error out upon encountering it. I have not seen anyone using subdirectories in bin/ yet. Is that supported anywhere? > So, IIUC, this complicated install phase is because we no longer take > 'pip' for granted and is only later available, built from this very > build system, right? Otherwise installing a wheel with pip would be > trivial (c.f. python-isort). If we want to bootstrap these two packages easily (and possibly start unvendoring their vendored dependencies later), they cannot be part of this build system and thus we need to implement building/installing ourselves. I tried using pypa-build in an earlier version, but the bootstrap chain is unmaintainable. There also is a project called installer[1], but it does not have a CLI yet. Cheers, Lars [1] https://github.com/pradyunsg/installer