From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:403:478a::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id oLs6N/cRDWXASgEAauVa8A:P1 (envelope-from ) for ; Fri, 22 Sep 2023 06:03:04 +0200 Received: from aspmx1.migadu.com ([2001:41d0:403:478a::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id oLs6N/cRDWXASgEAauVa8A (envelope-from ) for ; Fri, 22 Sep 2023 06:03:04 +0200 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 199E3AC0E for ; Fri, 22 Sep 2023 06:03:02 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=RnIZcy47; 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=pass (policy=none) header.from=gnu.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1695355383; 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: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=532fQd3Dt1o4y3iORh+jldVV4oK8T9L36KByHCIsHR0=; b=uHWiQvi8DhFL1sDoc9cnzOKc517kfAWkXEFHy9GclXwgzSGnjl0vStArNEFhsw9qfRPKd/ ldTqFl51JMLt8ftARnFZuoA7gf0mv+hYrqD3I1fiKQu+AxCuG4DDlLZuRDowErU0A0p4Du SariIVMSzSTHxYDYbCe6vAL5s7dWZefubcdiVdm07Kp1WZNCqDFd/hG/tG8T5QQPkIe6Ak pFRUchhq3ZkGtatDkre91DazQ2VHywTLQGwi95PkIeYTvyspoV5ofkRw5GW5c8Ctf5on6Z A34xrAdLUxsIKFH592A9gvn4CYATmjSQjUgLkJc8mRxWIlKs55j50tkVjJ1dXA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1695355383; a=rsa-sha256; cv=none; b=VLVGblhdoc4tYnOleyI1XQViNzIkVe9PAC88dmRi2HXJuOGsHuMWg0Xx9dlgZdfmWd5ZTq P19uKTdklz8xM+XvLrtGnldHLUyO/VI+sbf8/ZP7CEDylzOLc9JyrBcku41XFwRu8yKUFu 5iuxbu53eTvM+snPoum9JfKX6S4FGFK5fRdsCy8p1lr1696Lkcz/AZJRxVSx2QS4JIYlOr tASHCcFRiTbL3B08E7q+53lj2bUMFUhZ6vPnj+xx+Ipm+AZp4fy/yLdhMRO9hvr6X/GcoJ 6egAfgIhDZI168/IXzwI72iIWMrRse4H7jC4hCcvOrYHJ5gNJoLLYJX6GU+vPg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=RnIZcy47; 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=pass (policy=none) header.from=gnu.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qjXNW-0000gk-LQ; Fri, 22 Sep 2023 00:02:54 -0400 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 1qjXNU-0000gO-TT for guix-patches@gnu.org; Fri, 22 Sep 2023 00:02:52 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qjXNU-0004QY-Jv for guix-patches@gnu.org; Fri, 22 Sep 2023 00:02:52 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qjXNe-0003Xw-TX for guix-patches@gnu.org; Fri, 22 Sep 2023 00:03:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#65010] [PATCH 0/8] Misc Python build system improvements Resent-From: Marius Bakke Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 22 Sep 2023 04:03:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 65010 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Lars-Dominik Braun , 65010@debbugs.gnu.org Cc: jgart@dismail.de Received: via spool by 65010-submit@debbugs.gnu.org id=B65010.169535535913603 (code B ref 65010); Fri, 22 Sep 2023 04:03:02 +0000 Received: (at 65010) by debbugs.gnu.org; 22 Sep 2023 04:02:39 +0000 Received: from localhost ([127.0.0.1]:35102 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qjXN4-0003X9-8z for submit@debbugs.gnu.org; Fri, 22 Sep 2023 00:02:39 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44190) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qjXN1-0003Wu-Cd for 65010@debbugs.gnu.org; Fri, 22 Sep 2023 00:02:24 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qjXMi-0004Du-SF; Fri, 22 Sep 2023 00:02:04 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=532fQd3Dt1o4y3iORh+jldVV4oK8T9L36KByHCIsHR0=; b=RnIZcy47Jb/pKDtBDGuk qwwebEvZua8jj7SH7w1AhJ2IiOyN69B0PKusJ5ylz4HaN69hk3n1QeguCKeWTN6Ww2NdMcbh7/xNB XnLWrEAHb+NrlUFO1agO9h9OykNtC8FpsMfWWtjBe+frX8F5el28lTFMLBT4asPGMoVG3lisB0q3A HlDHv1tPVAtzHPZgo1qSAG0jgLVURcpSb0L6/49Iz0a5mXY06CwwWrQnmzkbytMOjCnJawimgzopS E8yFWdEqlAzav8Vw51UD3hYCPLxKGhp3reKEubF1SKIiueAZq3Fa1UIpbXHjTnv5xpNDbTkQ+Gt58 xHPxJBDaxkJX7g==; From: Marius Bakke In-Reply-To: References: Date: Fri, 22 Sep 2023 12:01:57 +0800 Message-ID: <874jjm97pm.fsf@gnu.org> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" 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-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Scanner: mx0.migadu.com X-Migadu-Spam-Score: -6.04 X-Spam-Score: -6.04 X-Migadu-Queue-Id: 199E3AC0E X-TUID: xpkbiBN4eRt7 --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Lars-Dominik Braun skriver: > Hi, > > the attached patches contain various Python build system improvements > including an original TOML parser (which may be used by other build > systems and importers in the future too) and fixes for #62781 and #63044. > I=E2=80=99m also pushing the patches to the pyproject-toml branch. As alw= ays, > a world rebuild is required. Hi Lars! > Lars-Dominik Braun (8): > build-system/pyproject: Use python-sans-pip-wrapper as default-python. > build-system/python: Ignore symlinks when changing mtime. > gnu: criu: Change file mtimes to fix build. > gnu: sssd: Change file mtimes to fix build. > guix: toml: Add TOML parser. > build-system/pyproject: Use TOML parser. > gnu: python-pytest-xdist: Disable failing test. > guix: pyproject-build-system: Default configure-flags to empty > dictionary. I read through these patches and they LGTM overall. Some individual comments follow. >>>From 70baccd8068f35ff8dce0955eaea60f7ea9c240e Mon Sep 17 00:00:00 2001 > Message-ID: <70baccd8068f35ff8dce0955eaea60f7ea9c240e.1690972374.git.lars= @6xq.net> > In-Reply-To: > References: > From: Lars-Dominik Braun > Date: Thu, 11 May 2023 08:33:02 +0200 > Subject: [PATCH 1/8] build-system/pyproject: Use python-sans-pip-wrapper = as > default-python. > > Also adds python-setuptools and python-wheel to relevant packages, > either to native-inputs or to propagated inputs if the pkg_resources > Python module is loaded at runtime. > > * guix/build-system/pyproject.scm (default-python): Default to > python-sans-pip-wrapper. This change makes sense. Using a 'python-toolchain' by default was a mistake, a quite expensive one by the diff. Sorry about that, and thanks for fixing it. As you noted elsewhere (and for those following along at home): this is necessary to solve a cycle at the root of the Python package graph. It also is more "correct" in that there are no surprising or hidden inputs. [...thinking while typing...] About 'wheel': that package *is* actually required by the build system (as opposed to pypa-build!): I think we should make it available by default (e.g. with a #:wheel argument), or propagate it from the build systems. It makes no sense to add it to _all_ pyproject-build-system consumers. WDYT? [...] >>>From f4697d0da0018e66ae759a9495a82f364cad5ccd Mon Sep 17 00:00:00 2001 > Message-ID: > In-Reply-To: > References: > From: Lars-Dominik Braun > Date: Sat, 13 May 2023 15:31:06 +0200 > Subject: [PATCH 2/8] build-system/python: Ignore symlinks when changing m= time. > > * guix/build/python-build-system.scm (ensure-no-mtimes-pre-1980): Ignore > 'symlink. LGTM. >>>From a0d4c891e6cf3522c6769e82d888d906445363f5 Mon Sep 17 00:00:00 2001 > Message-ID: > In-Reply-To: > References: > From: Lars-Dominik Braun > Date: Sat, 13 May 2023 15:31:22 +0200 > Subject: [PATCH 3/8] gnu: criu: Change file mtimes to fix build. This commit title is weird. The build is already working, but using a workaround that is no longer needed. > * gnu/packages/virtualization.scm (criu)[arguments]: Add > python-build-system to #:modules and #:imported modules, add phase > 'ensure-no-mtimes-pre-1980. LGTM. >>>From 824c6ea30573c3a02f33058bd1739be4cd980da2 Mon Sep 17 00:00:00 2001 > Message-ID: <824c6ea30573c3a02f33058bd1739be4cd980da2.1690972374.git.lars= @6xq.net> > In-Reply-To: > References: > From: Lars-Dominik Braun > Date: Sat, 13 May 2023 16:20:23 +0200 > Subject: [PATCH 4/8] gnu: sssd: Change file mtimes to fix build. > > * gnu/packages/sssd.scm (sssd)[arguments]: Add > python-build-system to #:modules and #:imported modules, add phase > 'ensure-no-mtimes-pre-1980. Ditto. >>>From 72d66e838ce9d3d2182c570ee3088063e372fcdd Mon Sep 17 00:00:00 2001 > Message-ID: <72d66e838ce9d3d2182c570ee3088063e372fcdd.1690972374.git.lars= @6xq.net> > In-Reply-To: > References: > From: Lars-Dominik Braun > Date: Sun, 23 Jul 2023 11:20:03 +0200 > Subject: [PATCH 5/8] guix: toml: Add TOML parser. > > * guix/build/toml.scm: New file. > * tests/toml.scm: New file. > * Makefile.am: Register new files. > --- > Makefile.am | 2 + > guix/build/toml.scm | 478 ++++++++++++++++++++++++++++++++++++++++++++ > tests/toml.scm | 442 ++++++++++++++++++++++++++++++++++++++++ Woow, amazing work, and I'm surprised it's less than 500 lines! I haven't studied it in detail, but on the surface LGTM. >>>From 8e079b48b7c07c07360db8eb6305e8044d86dd87 Mon Sep 17 00:00:00 2001 > Message-ID: <8e079b48b7c07c07360db8eb6305e8044d86dd87.1690972374.git.lars= @6xq.net> > In-Reply-To: > References: > From: Lars-Dominik Braun > Date: Sun, 23 Jul 2023 11:22:03 +0200 > Subject: [PATCH 6/8] build-system/pyproject: Use TOML parser. > > More reliable than regular expressions. > > * guix/build-system/pyproject.scm (%pyproject-build-system-modules): Add = (guix build toml). > (pyproject-build): Add argument #:backend-path. > * guix/build/pyproject-build-system.scm (build): Add support for > auto-detected and override backend-path. > * gnu/packages/python-build.scm (python-tomli)[arguments]: Remove > 'add-self-to-path, because it is not necessary any more. > (python-poetry-core): Same. > (python-hatchling): Same. > (python-pdm-backend): Same. > --- > gnu/packages/python-build.scm | 30 ++------------ > guix/build-system/pyproject.scm | 3 ++ > guix/build/pyproject-build-system.scm | 56 +++++++++++++++------------ > 3 files changed, 39 insertions(+), 50 deletions(-) LGTM... [...] > diff --git a/guix/build-system/pyproject.scm b/guix/build-system/pyprojec= t.scm > index 94b9d79692..585117cbf0 100644 > --- a/guix/build-system/pyproject.scm > +++ b/guix/build-system/pyproject.scm > @@ -46,6 +46,7 @@ (define %pyproject-build-system-modules > ;; Build-side modules imported by default. > `((guix build pyproject-build-system) > (guix build json) > + (guix build toml) > ,@%python-build-system-modules)) >=20=20 > (define (default-python) > @@ -93,6 +94,7 @@ (define* (pyproject-build name inputs > #:key source > (tests? #t) > (configure-flags ''()) > + (backend-path #f) > (build-backend #f) > (test-backend #f) > (test-flags ''()) > @@ -116,6 +118,7 @@ (define* (pyproject-build name inputs > #:source #+source > #:configure-flags #$configure-flags > #:system #$system > + #:backend-path #$backend-path > #:build-backend #$build-backend > #:test-backend #$test-backend > #:test-flags #$test-flags > diff --git a/guix/build/pyproject-build-system.scm b/guix/build/pyproject= -build-system.scm > index c69ccc9d64..a1919eacf6 100644 > --- a/guix/build/pyproject-build-system.scm > +++ b/guix/build/pyproject-build-system.scm > @@ -21,11 +21,13 @@ (define-module (guix build pyproject-build-system) > #:use-module ((guix build python-build-system) #:prefix python:) > #:use-module (guix build utils) > #:use-module (guix build json) > + #:use-module (guix build toml) > #:use-module (ice-9 match) > #:use-module (ice-9 ftw) > #:use-module (ice-9 format) > #:use-module (ice-9 rdelim) > #:use-module (ice-9 regex) > + #:use-module (ice-9 textual-ports) This import seems unused? > #:use-module (srfi srfi-1) > #:use-module (srfi srfi-26) > #:use-module (srfi srfi-34) > @@ -60,8 +62,8 @@ (define-module (guix build pyproject-build-system) > ;;; wheel and expected to be created by the installing utility. > ;;; TODO: Add support for PEP-621 entry points. > ;;; > -;;; Caveats: > -;;; - There is no support for in-tree build backends. > +;;; This module also supports in-tree build backends, which can be > +;;; overridden by #:backend-path. Perhaps this should also be documented in the manual. >>>From e987a9e28ec0d8d1b8ecdb2486eb12eae270a49d Mon Sep 17 00:00:00 2001 > Message-ID: > In-Reply-To: > References: > From: Lars-Dominik Braun > Date: Tue, 25 Jul 2023 18:26:58 +0200 > Subject: [PATCH 7/8] gnu: python-pytest-xdist: Disable failing test. > > * gnu/packages/check.scm (python-pytest-xdist)[arguments]: Skip failing > test. OK. >>>From b3726639df72aa3943d8e403e3c2b9a6cde05421 Mon Sep 17 00:00:00 2001 > Message-ID: > In-Reply-To: > References: > From: Lars-Dominik Braun > Date: Sun, 30 Jul 2023 13:36:37 +0200 > Subject: [PATCH 8/8] guix: pyproject-build-system: Default configure-flag= s to > empty dictionary. > > PEP 517 specifies it should be a dictionary and thus meson-python cannot > handle an empty list. > > Fixes: > --- > gnu/packages/build-tools.scm | 10 ++-------- > gnu/packages/python-science.scm | 5 ----- > guix/build-system/pyproject.scm | 2 +- > 3 files changed, 3 insertions(+), 14 deletions(-) The commit message lacks a mention of the changed variables. [...] > diff --git a/guix/build-system/pyproject.scm b/guix/build-system/pyprojec= t.scm > index 585117cbf0..c0e089eac7 100644 > --- a/guix/build-system/pyproject.scm > +++ b/guix/build-system/pyproject.scm > @@ -93,7 +93,7 @@ (define* (lower name > (define* (pyproject-build name inputs > #:key source > (tests? #t) > - (configure-flags ''()) > + (configure-flags ''(@)) I don't understand how the @ makes it a dictionary. Can you enlighten me? Either here, or in a comment? :-) LGTM anyway! Let's get these merged in the 'python-team' branch. WDYT jgart? --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iIUEARYKAC0WIQRNTknu3zbaMQ2ddzTocYulkRQQdwUCZQ0RtQ8cbWFyaXVzQGdu dS5vcmcACgkQ6HGLpZEUEHcaegD5AaG2ZPX/J0WwaoyYbgtU4FmQKxcpgwGsQ7jg JUZfoCkA/iN3VSpkcOEJqfzoNnzXxE3m+Wg5clrgZKItz7TY3gAN =WgZc -----END PGP SIGNATURE----- --=-=-=--