From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id YLwxB+D44mWxEAEAe85BDQ:P1 (envelope-from ) for ; Sat, 02 Mar 2024 11:01:04 +0100 Received: from aspmx1.migadu.com ([2001:41d0:303:e224::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2.migadu.com with LMTPS id YLwxB+D44mWxEAEAe85BDQ (envelope-from ) for ; Sat, 02 Mar 2024 11:01:04 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=6xq.net header.s=MBO0001 header.b="lnMa3/YU"; 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=fail reason="SPF not aligned (relaxed)" header.from=6xq.net (policy=none) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1709373662; 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=xqw65LwZ7Kwzc2G2rPsKhSyj4jgwZhwOUeLOEP+k8zI=; b=gxuFWreDPI8yTBijaBSm8xJPj6U2spUTUX2JFNXZhGC/xqHbKI1xyDv6TLjOlTP/tUN4U/ hAP5b7DO5nOeHhYpMB4W5XIq87Ot9Ei62igERDQtJJsnnPXkj10UCuOxyLubnUx7imUIMR LACVKpUNtLhp7lG1YEG5LImbU3Wz5U4nNxRrAA8sZe0Y7G8sPKhOA0LyePo24SMl+ZPDLU /Eq5unipVqm//fQAHQ+sTHwkw3rlT9fbepnKfSbCeq5eLdVVDG7aTwIlMVZQqOhboAT9dB P+tgVepsxgN6sKcXMvZr3BkxAQutTBN5pL9tBjlPw1ipgRKU1ARIJrfI8vdOAA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=6xq.net header.s=MBO0001 header.b="lnMa3/YU"; 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=fail reason="SPF not aligned (relaxed)" header.from=6xq.net (policy=none) ARC-Seal: i=1; s=key1; d=yhetil.org; t=1709373662; a=rsa-sha256; cv=none; b=XD8s3ZvJcyNjKQH2eveo5Gq3K5CClF2aFxkCZV20W0r+alBWQGKftNM7VrDlAfHqfJSLLe Kih7yysnHYG4L2RXAYZlWNj3+9AvvctWg6sHzDUpoa6ARluObTSefcrti5/js8EBtiHO7r 72cj4Oks+mJKqjoms/lSHNEsCNSgJPNo9eW2MOG5rhA1LOaRK+P8kYxRg6XD9Na0o5yvgI pF47UKNjQhUAHtGL4RCxxocxJI6ge1MsO1Vct4O/wBNnZD6TYoJju1wQkwvjlw+7/hlkD/ 1Y/btkIq0hA26K6EPTSuO8PCy5BExTsZh6/OnM7u2AyVkBQGxEV6jjEN1QXDAg== 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 658A521B7C for ; Sat, 2 Mar 2024 11:01:01 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rgMAi-0006Ys-T4; Sat, 02 Mar 2024 05:00:49 -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 1rgMAU-0006Rl-A7 for guix-patches@gnu.org; Sat, 02 Mar 2024 05:00:43 -0500 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 1rgMAU-0006d6-1e for guix-patches@gnu.org; Sat, 02 Mar 2024 05:00:34 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rgMAv-0005hf-S0 for guix-patches@gnu.org; Sat, 02 Mar 2024 05:01:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#60240] [PATCH v2] gnu: Add python-3.12 and python-next. Resent-From: Lars-Dominik Braun Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 02 Mar 2024 10:01:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60240 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Tanguy LE CARROUR Cc: 60240@debbugs.gnu.org Received: via spool by 60240-submit@debbugs.gnu.org id=B60240.170937363821881 (code B ref 60240); Sat, 02 Mar 2024 10:01:01 +0000 Received: (at 60240) by debbugs.gnu.org; 2 Mar 2024 10:00:38 +0000 Received: from localhost ([127.0.0.1]:38065 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rgMAX-0005gq-OD for submit@debbugs.gnu.org; Sat, 02 Mar 2024 05:00:38 -0500 Received: from mout-p-202.mailbox.org ([80.241.56.172]:60718) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rgMAU-0005gT-H0 for 60240@debbugs.gnu.org; Sat, 02 Mar 2024 05:00:35 -0500 Received: from smtp102.mailbox.org (smtp102.mailbox.org [IPv6:2001:67c:2050:b231:465::102]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-202.mailbox.org (Postfix) with ESMTPS id 4Tn0mc1KfSz9t9n; Sat, 2 Mar 2024 10:59:28 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6xq.net; s=MBO0001; t=1709373568; 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=xqw65LwZ7Kwzc2G2rPsKhSyj4jgwZhwOUeLOEP+k8zI=; b=lnMa3/YUKxMiShJiiKxVmV77cDFctzs3TC8oVbm/BDxL5xbpbK6n9uX7fxeJThtaV4xTSm NtpjvBUPvAIJ1u3uX2YJWr5BVWlEFO86v4csR7uo+enBhdIr7yPFMmEtTa2Wwz2UWpOj7i g56JeSQmznaeIoApJSP9gWiTHh9HMKt1BXGXdRwRpBi2sCUlyMySEAUb4oTmF1Iwwq9V2s mNKcLrRb8zJWobryMcjh/G3ExbOrKQKdSZL1L9ihwil5sIoDx9FWuZ7gIaznQ36zkny8gD TVemHkdUBagftmgpmMOHLrzPU8LOxOUJ3Gtwd1l1ZyDY5+yb1nxIMRUkYPfWww== Date: Sat, 2 Mar 2024 10:59:23 +0100 From: Lars-Dominik Braun Message-ID: References: <20221221153230.27764-1-tanguy@bioneland.org> <4832d706e706ced5aa8a52f1b63b1e676ea5fd3d.1708516654.git.tanguy@bioneland.org> <170893592338.2024.18126018474930945065@bioneland.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="aLKUxhnrunFV3YGR" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <170893592338.2024.18126018474930945065@bioneland.org> X-Rspamd-Queue-Id: 4Tn0mc1KfSz9t9n 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 X-Migadu-Scanner: mx12.migadu.com X-Migadu-Spam-Score: 2.53 X-Spam-Score: 2.53 X-Migadu-Queue-Id: 658A521B7C X-TUID: 45PnCGZ8POJx --aLKUxhnrunFV3YGR Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit Hey, > Sorry, but I’m not sure to see what you mean!? > Outputs are defined for `out`, `tk` and `idle`. And I see phases to move > files to the outputs: `move-tk-inter` and `move-idle`. > > What do you mean by `referenced from out`? And how would you remove such > a reference! so, if you look at `guix size python@3.12`, you can see it lists tk and tcl. And then a `grep -Ri /gnu/store/path/to/tcl /gnu/store/path/to/python` reveals it’s being referenced by lib/python3.12/_sysconfigdata__linux_x86_64-linux-gnu.py and lib/python3.12/config-3.12-x86_64-linux-gnu/Makefile, which are both part of the default “out” output. That means TCL and TK are both part of the closure of the python@3.12 package, i.e. they are downloaded whenever you install it, making the package “bigger” in size (234.5 MiB in total to be precise). I believe we wanted to avoid that by moving some parts of Python into the separate “tk” output. But apparently that does not work (any more). The attached patch (on top of yours) removes these references and shrinks the closure of python@3.12 to 180.6 MiB. But I don’t know whether it has any negative side-effects (i.e. packages not building any more), because I can’t build libxslt with Python 3.12 due to the module “imp” having been removed in Python 3.12. > I searched in the issue list on GH, but couldn’t find anything relevant. > But there are quite a lot of issues there. > Do we have to fix this before we merge it? No, we’d have to dig deeper into which particular test causes this behavior. And actually one more nitpick: The name of the package should be “python-next” not “python”, otherwise `guix install python` will pick Python 3.12 (it’s based on the name property, not the variable name). Cheers, Lars --aLKUxhnrunFV3YGR Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="python-3.12-remove-tk-tcl-refs.patch" diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index 471cf190fb..0b887a2cdb 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -836,7 +836,7 @@ (define-public python-3.12 "json/tests" "distutils/tests")))))))) (add-after 'remove-tests 'move-tk-inter - (lambda* (#:key outputs #:allow-other-keys) + (lambda* (#:key outputs inputs #:allow-other-keys) ;; When Tkinter support is built move it to a separate output so ;; that the main output doesn't contain a reference to Tcl/Tk. (let ((out (assoc-ref outputs "out")) @@ -854,7 +854,14 @@ (define-public python-3.12 len) "/site-packages"))) (install-file tkinter.so target) - (delete-file tkinter.so)))))))) + (delete-file tkinter.so)))) + ;; Remove explicit store path references. + (let ((tcl (assoc-ref inputs "tcl")) + (tk (assoc-ref inputs "tk"))) + (substitute* (find-files (string-append out "/lib") + "^(_sysconfigdata_.*\\.py|Makefile)$") + (((string-append "-L" tk "/lib")) "") + (((string-append "-L" tcl "/lib")) ""))))))) (add-after 'move-tk-inter 'move-idle (lambda* (#:key outputs #:allow-other-keys) ;; when idle is built, move it to a separate output to save some --aLKUxhnrunFV3YGR--