From unknown Sat Aug 16 19:16:23 2025 X-Loop: help-debbugs@gnu.org Subject: bug#22437: Problems with non-auto-translated python-2 package variants Resent-From: Leo Famulari Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Fri, 22 Jan 2016 19:53:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 22437 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: 22437@debbugs.gnu.org X-Debbugs-Original-To: bug-guix@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.145349237625254 (code B ref -1); Fri, 22 Jan 2016 19:53:01 +0000 Received: (at submit) by debbugs.gnu.org; 22 Jan 2016 19:52:56 +0000 Received: from localhost ([127.0.0.1]:58105 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aMhlP-0006ZF-Tc for submit@debbugs.gnu.org; Fri, 22 Jan 2016 14:52:56 -0500 Received: from eggs.gnu.org ([208.118.235.92]:56313) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aMhlO-0006Z1-2J for submit@debbugs.gnu.org; Fri, 22 Jan 2016 14:52:54 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aMhlH-0006Aw-P1 for submit@debbugs.gnu.org; Fri, 22 Jan 2016 14:52:48 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=BAYES_40,T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:45613) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aMhlH-0006Ar-MN for submit@debbugs.gnu.org; Fri, 22 Jan 2016 14:52:47 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47279) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aMhlG-00081q-Fe for bug-guix@gnu.org; Fri, 22 Jan 2016 14:52:47 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aMhlB-00069P-GZ for bug-guix@gnu.org; Fri, 22 Jan 2016 14:52:46 -0500 Received: from out3-smtp.messagingengine.com ([66.111.4.27]:49827) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aMhlA-000680-JV for bug-guix@gnu.org; Fri, 22 Jan 2016 14:52:41 -0500 Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.nyi.internal (Postfix) with ESMTP id 0361820E54; Fri, 22 Jan 2016 14:52:39 -0500 (EST) Received: from frontend1 ([10.202.2.160]) by compute2.internal (MEProxy); Fri, 22 Jan 2016 14:52:40 -0500 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=famulari.name; h= content-type:date:from:message-id:mime-version:subject:to :x-sasl-enc:x-sasl-enc; s=mesmtp; bh=x6VIMlcZEEzlR6WyCmHrbISpZx4 =; b=NB6RqV1lBOACJ2nyVB2nA2ZOtQhd3kVDCS1e29KRYgGoSlF73zSjBQ1QNe0 /0U8vDO+BHTybm7XBF5i/IlDM4h2Bsp5zo9Cq68qWZMfs3InC16iiysNvmSU1ynN A4AHJg5jKO6VEF3IB9IB1e08psVTbBz9sRhSG0R7SoXp2ZRU= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=content-type:date:from:message-id :mime-version:subject:to:x-sasl-enc:x-sasl-enc; s=smtpout; bh=x6 VIMlcZEEzlR6WyCmHrbISpZx4=; b=lsXAueGMH1xrOfJQyW0vFk0e+Cc6yOsJVi RNp+hZWmy6KFf08vEKU0LMKMkgcY9ON/eFYfBW6kueqXHk4AuHzrPOrLh8QnHqgO 8i+TbZBLmW4MQNdlrJVuNguYdklVaBwTeMvEqUW3B/NSuiMSERcRetFI6QodiMZt mjac6rJ50= X-Sasl-enc: Bx0keuAI/WD/+R1cgBJgXhSHb2VBzi8HaWdNFPMIBPdU 1453492359 Received: from localhost (c-68-81-58-201.hsd1.pa.comcast.net [68.81.58.201]) by mail.messagingengine.com (Postfix) with ESMTPA id AAC6FC013FE for ; Fri, 22 Jan 2016 14:52:39 -0500 (EST) Date: Fri, 22 Jan 2016 14:52:42 -0500 From: Leo Famulari Message-ID: <20160122195242.GA26196@jasmine> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.24 (2015-08-30) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.1 (----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.1 (----) Python-2 variants of python-3 packages that are not automatically translated by package-with-python2 are not used by auto-translated python-2 packages. For example, python2-cryptography requires python2-ipaddress. This is not required by python-cryptography: http://git.savannah.gnu.org/cgit/guix.git/tree/gnu/packages/python.scm#n5838 Python-oauthlib requires python-cryptography, and thus cannot be translated wholly by package-with-python2. Package-with-python2 fails to refer to the "hand-made" python2-cryptography that includes python2-ipaddress, and insteads attempts to generate it automatically. This results in a failed build of python2-cryptopgraphy because python2-ipaddress is not being provided. The solution is to remove python-cryptography from python2-oauthlib and provide python2-cryptography "by hand": http://git.savannah.gnu.org/cgit/guix.git/tree/gnu/packages/python.scm#n2333 This is especially annoying when a python-2 variant needs to refer to more than one of these "hand-made" python-2 packages: http://lists.gnu.org/archive/html/guix-devel/2015-12/msg00921.html There are many python-3 packages that include python-setuptools, even though they build without it. I assume this is to easily take advantage of package-with-python2. Some context: bug: python2 versions of packages failing as inputs http://debbugs.gnu.org/cgi/bugreport.cgi?bug=22013 guix-devel: Python2-jsonschema fails: http://lists.gnu.org/archive/html/guix-devel/2016-01/msg00604.html guix-devel: Split acme into both Python variants http://lists.gnu.org/archive/html/guix-devel/2015-12/msg00921.html From unknown Sat Aug 16 19:16:23 2025 X-Loop: help-debbugs@gnu.org Subject: bug#22437: Fixing package-with-python2 Resent-From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Wed, 03 Feb 2016 08:48:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 22437 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: guix-devel , 22437@debbugs.gnu.org Received: via spool by 22437-submit@debbugs.gnu.org id=B22437.145448925030562 (code B ref 22437); Wed, 03 Feb 2016 08:48:01 +0000 Received: (at 22437) by debbugs.gnu.org; 3 Feb 2016 08:47:30 +0000 Received: from localhost ([127.0.0.1]:57446 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aQt61-0007ws-OT for submit@debbugs.gnu.org; Wed, 03 Feb 2016 03:47:30 -0500 Received: from eggs.gnu.org ([208.118.235.92]:53872) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aQt60-0007wb-A1 for 22437@debbugs.gnu.org; Wed, 03 Feb 2016 03:47:28 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aQt5r-0005MC-VC for 22437@debbugs.gnu.org; Wed, 03 Feb 2016 03:47:23 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.4 required=5.0 tests=BAYES_50,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:52302) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aQt5r-0005M8-Rv; Wed, 03 Feb 2016 03:47:19 -0500 Received: from reverse-83.fdn.fr ([80.67.176.83]:54448 helo=pluto) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1aQt5q-0001rY-4f; Wed, 03 Feb 2016 03:47:18 -0500 From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) References: <87vb68nkyb.fsf@gnu.org> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 15 =?UTF-8?Q?Pluvi=C3=B4se?= an 224 de la =?UTF-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x3D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-unknown-linux-gnu Date: Wed, 03 Feb 2016 09:47:15 +0100 In-Reply-To: <87vb68nkyb.fsf@gnu.org> ("Ludovic \=\?utf-8\?Q\?Court\=C3\=A8s\=22'\?\= \=\?utf-8\?Q\?s\?\= message of "Mon, 01 Feb 2016 23:07:40 +0100") Message-ID: <87twlqxjsc.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.5 (-----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.5 (-----) --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable ludo@gnu.org (Ludovic Court=C3=A8s) skribis: > An idea I haven=E2=80=99t taken the time to test yet would be to use > =E2=80=98properties=E2=80=99: > > (define python-foobar ;with Python 3 > (package > (name "foobar") > ;; Specify which Python 2 variant to use. > (properties `((python2-variant . ,(delay python2-foobar)))))) > > (define python2-foobar > (package (inherit python-foobar) > ;; =E2=80=A6 stuff beyond the mechanical python 2=E2=86=923 switch= =E2=80=A6 > )) > > =E2=80=98package-with-python2=E2=80=99 would honor this =E2=80=98python2-= variant=E2=80=99 property. Here=E2=80=99s a first stab at this. As an example, I modified =E2=80=98python-matplotlib=E2=80=99 to use that f= eature, so we can test that =E2=80=98python2-scipy=E2=80=99 is using the right =E2=80=98p= ython2-matplotlib=E2=80=99: --8<---------------cut here---------------start------------->8--- $ ./pre-inst-env guix build python2-matplotlib -d 2>/dev/null /gnu/store/07zr2pqg61b742czb2aqyisml2i90r4a-python2-matplotlib-1.4.3.drv $ ./pre-inst-env guix build python2-scipy -d 2>/dev/null /gnu/store/8yhxdbyjvx2xwynpqqcrj9ilksd2pb01-python2-scipy-0.16.0.drv $ guix gc --references /gnu/store/8yhxdbyjvx2xwynpqqcrj9ilksd2pb01-python2-= scipy-0.16.0.drv | grep python2-matplotlib /gnu/store/07zr2pqg61b742czb2aqyisml2i90r4a-python2-matplotlib-1.4.3.drv --8<---------------cut here---------------end--------------->8--- This will trigger rebuilds (but with an identical result) because in manually-written variants we would use =E2=80=9Cpython2-foo=E2=80=9D as the= label of inputs, whereas the automatic transformations keeps the original =E2=80=9Cpython-foo=E2=80=9D label. What do people think? I can apply this patch of the approach sounds good to you. I think we should probably do one commit per rewrite for clarity. We should probably start with the lowest level, like python2-pycairo and python2-pygobject and even python itself, because if we fix them then some of the higher-level stuff won=E2=80=99t even need their own =E2=80=98python2-variant=E2=80=99 property. For instance, if python, pycai= ro, and pygobject have their =E2=80=98python2-variant=E2=80=99 set, then we no long= er need this: --8<---------------cut here---------------start------------->8--- (define-public python2-matplotlib (let ((matplotlib (package-with-python2 %python-matplotlib))) (package (inherit matplotlib) ;; Make sure to use special packages for Python 2 instead ;; of those automatically rewritten by package-with-python2. (propagated-inputs `(("python2-pycairo" ,python2-pycairo) ("python2-pygobject-2" ,python2-pygobject-2) ("python2-tkinter" ,python-2 "tk") ,@(fold alist-delete (package-propagated-inputs matplotlib) '("python-pycairo" "python-pygobject" "python-tkinter"))))= ))) --8<---------------cut here---------------end--------------->8--- =E2=80=A6 and as a consequence, we don=E2=80=99t need a =E2=80=98python2-va= riant=E2=80=99 in =E2=80=98python-matplotlib=E2=80=99. Does that make sense? Any takers? (This can be done incrementally.) Thanks, Ludo=E2=80=99. --=-=-= Content-Type: text/x-patch Content-Disposition: inline diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index 48f65b5..b43f539 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -2913,7 +2913,7 @@ is designed to have a low barrier to entry.") (define-public python2-rq (package-with-python2 python-rq)) -(define-public python-cython +(define %python-cython (package (name "python-cython") (version "0.23.4") @@ -2946,8 +2946,13 @@ programming language and the extended Cython programming language. It makes writing C extensions for Python as easy as Python itself.") (license asl2.0))) +(define-public python-cython + (package + (inherit %python-cython) + (properties `((python2-variant . ,(delay python2-cython)))))) + (define-public python2-cython - (package (inherit (package-with-python2 python-cython)) + (package (inherit (package-with-python2 %python-cython)) (name "python2-cython") (inputs `(("python-2" ,python-2))))) ; this is not automatically changed @@ -3117,13 +3122,7 @@ association studies (GWAS) on extremely large data sets.") ,phases))))))) (define-public python2-numpy - (let ((numpy (package-with-python2 python-numpy))) - (package (inherit numpy) - ;; Make sure we use exactly PYTHON2-MATPLOTLIB, which is customized for - ;; Python 2. - (inputs `(("python2-matplotlib" ,python2-matplotlib) - ,@(alist-delete "python-matplotlib" - (package-inputs numpy))))))) + (package-with-python2 python-numpy)) (define-public python-pyparsing (package @@ -3247,7 +3246,7 @@ transcendental functions).") ,@(alist-delete "python-numpy" (package-propagated-inputs numexpr))))))) -(define-public python-matplotlib +(define %python-matplotlib (package (name "python-matplotlib") (version "1.4.3") @@ -3323,7 +3322,7 @@ transcendental functions).") (lambda (port) (format port "[directories]~% basedirlist = ~a,~a~% -[rc_options]~% + [rc_options]~% backend = TkAgg~%" (assoc-ref inputs "tcl") (assoc-ref inputs "tk")))))) @@ -3372,8 +3371,13 @@ ipython shell, web application servers, and six graphical user interface toolkits.") (license psfl))) +(define-public python-matplotlib + (package + (inherit %python-matplotlib) + (properties `((python2-variant . ,(delay python2-matplotlib)))))) + (define-public python2-matplotlib - (let ((matplotlib (package-with-python2 python-matplotlib))) + (let ((matplotlib (package-with-python2 %python-matplotlib))) (package (inherit matplotlib) ;; Make sure to use special packages for Python 2 instead ;; of those automatically rewritten by package-with-python2. @@ -3549,15 +3553,7 @@ routines such as routines for numerical integration and optimization.") (license bsd-3))) (define-public python2-scipy - (let ((scipy (package-with-python2 python-scipy))) - (package (inherit scipy) - ;; Use packages customized for python-2. - (propagated-inputs - `(("python2-matplotlib" ,python2-matplotlib) - ("python2-numpy" ,python2-numpy) - ,@(alist-delete "python-matplotlib" - (alist-delete "python-numpy" - (package-propagated-inputs scipy)))))))) + (package-with-python2 python-scipy)) (define-public python-sqlalchemy (package diff --git a/guix/build-system/python.scm b/guix/build-system/python.scm index 9a80bd6..74ec854 100644 --- a/guix/build-system/python.scm +++ b/guix/build-system/python.scm @@ -65,12 +65,19 @@ extension, such as '.tar.gz'." (let ((python (resolve-interface '(gnu packages python)))) (module-ref python 'python-2))) -(define (package-with-explicit-python python old-prefix new-prefix) +(define* (package-with-explicit-python python old-prefix new-prefix + #:key variant-property) "Return a procedure of one argument, P. The procedure creates a package with the same fields as P, which is assumed to use PYTHON-BUILD-SYSTEM, such that it is compiled with PYTHON instead. The inputs are changed recursively accordingly. If the name of P starts with OLD-PREFIX, this is replaced by -NEW-PREFIX; otherwise, NEW-PREFIX is prepended to the name." +NEW-PREFIX; otherwise, NEW-PREFIX is prepended to the name. + +When VARIANT-PROPERTY is present, it is used as a key to search for +pre-defined variants of this transformation recorded in the 'properties' field +of packages. The property value must be the promise of a package. This is a +convenient way for package writers to force the transformation to use +pre-defined variants." (define transform ;; Memoize the transformations. Failing to do that, we would build a huge ;; object graph with lots of duplicates, which in turns prevents us from @@ -90,26 +97,34 @@ NEW-PREFIX; otherwise, NEW-PREFIX is prepended to the name." ((name content . rest) (append (list name (rewrite-if-package content)) rest))))) - (if (eq? (package-build-system p) python-build-system) - (package - (inherit p) - (location (package-location p)) - (name (let ((name (package-name p))) - (string-append new-prefix - (if (string-prefix? old-prefix name) - (substring name - (string-length old-prefix)) - name)))) - (arguments - (let ((python (if (promise? python) - (force python) - python))) - (ensure-keyword-arguments (package-arguments p) - `(#:python ,python)))) - (inputs (map rewrite (package-inputs p))) - (propagated-inputs (map rewrite (package-propagated-inputs p))) - (native-inputs (map rewrite (package-native-inputs p)))) - p))))) + (cond + ;; If VARIANT-PROPERTY is present, use that. + ((and variant-property + (assoc-ref (package-properties p) variant-property)) + => force) + + ;; Otherwise build the new package object graph. + ((eq? (package-build-system p) python-build-system) + (package + (inherit p) + (location (package-location p)) + (name (let ((name (package-name p))) + (string-append new-prefix + (if (string-prefix? old-prefix name) + (substring name + (string-length old-prefix)) + name)))) + (arguments + (let ((python (if (promise? python) + (force python) + python))) + (ensure-keyword-arguments (package-arguments p) + `(#:python ,python)))) + (inputs (map rewrite (package-inputs p))) + (propagated-inputs (map rewrite (package-propagated-inputs p))) + (native-inputs (map rewrite (package-native-inputs p))))) + (else + p)))))) transform) @@ -118,7 +133,8 @@ NEW-PREFIX; otherwise, NEW-PREFIX is prepended to the name." ;; of packages is accessed to avoid a circular dependency when evaluating ;; the top-level of (gnu packages python). (package-with-explicit-python (delay (default-python2)) - "python-" "python2-")) + "python-" "python2-" + #:variant-property 'python2-variant)) (define* (lower name #:key source inputs native-inputs outputs system target --=-=-=-- From unknown Sat Aug 16 19:16:23 2025 X-Loop: help-debbugs@gnu.org Subject: bug#22437: Fixing package-with-python2 Resent-From: Efraim Flashner Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Sun, 07 Feb 2016 08:18:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 22437 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) Cc: guix-devel , 22437@debbugs.gnu.org Received: via spool by 22437-submit@debbugs.gnu.org id=B22437.14548330519428 (code B ref 22437); Sun, 07 Feb 2016 08:18:01 +0000 Received: (at 22437) by debbugs.gnu.org; 7 Feb 2016 08:17:31 +0000 Received: from localhost ([127.0.0.1]:36457 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aSKXD-0002S0-JG for submit@debbugs.gnu.org; Sun, 07 Feb 2016 03:17:31 -0500 Received: from flashner.co.il ([178.62.234.194]:55499) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aSKXB-0002Rq-KN for 22437@debbugs.gnu.org; Sun, 07 Feb 2016 03:17:30 -0500 Received: from debian-netbook (85.65.229.31.dynamic.barak-online.net [85.65.229.31]) by flashner.co.il (Postfix) with ESMTPSA id DC81140029; Sun, 7 Feb 2016 08:17:27 +0000 (UTC) Date: Sun, 7 Feb 2016 10:17:20 +0200 From: Efraim Flashner Message-ID: <20160207101720.4a3be103@debian-netbook> In-Reply-To: <87twlqxjsc.fsf@gnu.org> References: <87vb68nkyb.fsf@gnu.org> <87twlqxjsc.fsf@gnu.org> X-Mailer: Claws Mail 3.13.2 (GTK+ 2.24.29; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; boundary="Sig_/97JWleCq__OuzYvnEWllUCb"; protocol="application/pgp-signature" X-Spam-Score: -0.4 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.4 (/) --Sig_/97JWleCq__OuzYvnEWllUCb Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Wed, 03 Feb 2016 09:47:15 +0100 ludo@gnu.org (Ludovic Court=C3=A8s) wrote: > ludo@gnu.org (Ludovic Court=C3=A8s) skribis: >=20 > > An idea I haven=E2=80=99t taken the time to test yet would be to use > > =E2=80=98properties=E2=80=99: > > > > (define python-foobar ;with Python 3 > > (package > > (name "foobar") > > ;; Specify which Python 2 variant to use. > > (properties `((python2-variant . ,(delay python2-foobar)))))) This part I don't get. What's the period for? > > (define python2-foobar > > (package (inherit python-foobar) > > ;; =E2=80=A6 stuff beyond the mechanical python 2=E2=86=923 switc= h=E2=80=A6 > > )) > > > > =E2=80=98package-with-python2=E2=80=99 would honor this =E2=80=98python= 2-variant=E2=80=99 property. >=20 > Here=E2=80=99s a first stab at this. >=20 > As an example, I modified =E2=80=98python-matplotlib=E2=80=99 to use that= feature, so we > can test that =E2=80=98python2-scipy=E2=80=99 is using the right =E2=80= =98python2-matplotlib=E2=80=99: >=20 > --8<---------------cut here---------------start------------->8--- > $ ./pre-inst-env guix build python2-matplotlib -d 2>/dev/null > /gnu/store/07zr2pqg61b742czb2aqyisml2i90r4a-python2-matplotlib-1.4.3.drv > $ ./pre-inst-env guix build python2-scipy -d 2>/dev/null > /gnu/store/8yhxdbyjvx2xwynpqqcrj9ilksd2pb01-python2-scipy-0.16.0.drv > $ guix gc --references /gnu/store/8yhxdbyjvx2xwynpqqcrj9ilksd2pb01-python= 2-scipy-0.16.0.drv | grep python2-matplotlib > /gnu/store/07zr2pqg61b742czb2aqyisml2i90r4a-python2-matplotlib-1.4.3.drv > --8<---------------cut here---------------end--------------->8--- >=20 > This will trigger rebuilds (but with an identical result) because in > manually-written variants we would use =E2=80=9Cpython2-foo=E2=80=9D as t= he label of > inputs, whereas the automatic transformations keeps the original > =E2=80=9Cpython-foo=E2=80=9D label. rebuilds python-foo and python2-foo, or just the python2- variants? > What do people think? I like it. It keeps the logic in the build-system. In terms of a speed test when figuring out the build/dependancy graph, how does it affect the time of `guix graph python2-scipy python2-matplotlib`? > I can apply this patch of the approach sounds good to you. I think we > should probably do one commit per rewrite for clarity. >=20 > We should probably start with the lowest level, like python2-pycairo and > python2-pygobject and even python itself, because if we fix them then > some of the higher-level stuff won=E2=80=99t even need their own > =E2=80=98python2-variant=E2=80=99 property. For instance, if python, pyc= airo, and > pygobject have their =E2=80=98python2-variant=E2=80=99 set, then we no lo= nger need this: >=20 > --8<---------------cut here---------------start------------->8--- > (define-public python2-matplotlib > (let ((matplotlib (package-with-python2 %python-matplotlib))) > (package (inherit matplotlib) > ;; Make sure to use special packages for Python 2 instead > ;; of those automatically rewritten by package-with-python2. > (propagated-inputs > `(("python2-pycairo" ,python2-pycairo) > ("python2-pygobject-2" ,python2-pygobject-2) > ("python2-tkinter" ,python-2 "tk") > ,@(fold alist-delete (package-propagated-inputs matplotlib) > '("python-pycairo" "python-pygobject" "python-tkinter"))= ))))) > --8<---------------cut here---------------end--------------->8--- >=20 > =E2=80=A6 and as a consequence, we don=E2=80=99t need a =E2=80=98python2-= variant=E2=80=99 in > =E2=80=98python-matplotlib=E2=80=99. >=20 > Does that make sense? Any takers? (This can be done incrementally.) It fits our "one change per commit" policy, and if we don't start at the ba= se of the pyramid we'll be modifying and then removing the special variants. I don't mind doing the conversion process. > Thanks, > Ludo=E2=80=99. >=20 Thinking aloud, I think for the time being we should keep the python-setuptools that are already part of the python- variants where they are and save that for another time. --=20 Efraim Flashner =D7=90=D7=A4=D7=A8=D7=99=D7=9D = =D7=A4=D7=9C=D7=A9=D7=A0=D7=A8 GPG key =3D A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 Confidentiality cannot be guaranteed on emails sent or received unencrypted --Sig_/97JWleCq__OuzYvnEWllUCb Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCgAGBQJWtv2RAAoJEPTB05F+rO6TFoAP/jZ0bJcD6ujr0rWOShC3t78o GdVvzfAapEqtIEkOp9psu4hQ141+LmCA0ATDfUDoW9s6iIP0TOIhFya4GAb+JXEK RufE4jIWGWm922dVZupHPm6SOUjQN9rWyyiUQvG0tQ57vlTnHQ87IrrqPTm9EWua SBc+hpZzxfcFfvyxrPhMAgQwenHjQFwkzDedPEhpYsQkQLnLC3arj9uS3kBFK6rl VNnMrefT6Mra305Tf81vyTz0MD3OlNkYenAukslSH/2JAqX4GVMqC/LIBpuqYTlp ZUlH7ZyFbtkRSBzjcMJ49Evn7ytPV0wEBS4nsQahECsPDGYEqDkNFlRsq6VRBaXs oRglFxn+iediihotkjuR+q84VF7jay6fUqOtUaJ803KZXVQhk6kyXJ4PyzEOOIcL VIfFIj6dpXi3+6wXdXO9UNFTSV95Pk65DYlDQmJ+dmScLcOa27dAyHaglKPJm+Zx iWwLmhgtMoppFWZ1KV/Xf+RsouxVrnWHgf3K2f7K6HAloatPgaGMA+iH8mfDNsj8 wV/aKxBA481nXVY3TMgLwIDFEZJWy7GGFWiK2n5b21J9YoxhHnO8rFntkdDopMkZ SbN5irAzzTaPqBTa0hzqIoIKRYPNZQwgbaNK0pWoGIQCjneNG4nnN1pOPSeNiiYh +HyzxeiA4xDlLDMDPrqt =py3R -----END PGP SIGNATURE----- --Sig_/97JWleCq__OuzYvnEWllUCb-- From unknown Sat Aug 16 19:16:23 2025 X-Loop: help-debbugs@gnu.org Subject: bug#22437: Fixing package-with-python2 Resent-From: Ricardo Wurmus Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Sun, 07 Feb 2016 09:33:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 22437 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Efraim Flashner Cc: guix-devel , 22437@debbugs.gnu.org, Ludovic =?UTF-8?Q?Court=C3=A8s?= Received: via spool by 22437-submit@debbugs.gnu.org id=B22437.145483757916029 (code B ref 22437); Sun, 07 Feb 2016 09:33:01 +0000 Received: (at 22437) by debbugs.gnu.org; 7 Feb 2016 09:32:59 +0000 Received: from localhost ([127.0.0.1]:36466 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aSLiE-0004AS-Pm for submit@debbugs.gnu.org; Sun, 07 Feb 2016 04:32:58 -0500 Received: from sender163-mail.zoho.com ([74.201.84.163]:25722) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aSLiD-0004AK-PI for 22437@debbugs.gnu.org; Sun, 07 Feb 2016 04:32:58 -0500 Received: from localhost (x4d020948.dyn.telefonica.de [77.2.9.72]) by mx.zohomail.com with SMTPS id 1454837568966965.4068630859392; Sun, 7 Feb 2016 01:32:48 -0800 (PST) References: <87vb68nkyb.fsf@gnu.org> <87twlqxjsc.fsf@gnu.org> <20160207101720.4a3be103@debian-netbook> User-agent: mu4e 0.9.13; emacs 24.5.1 From: Ricardo Wurmus In-reply-to: <20160207101720.4a3be103@debian-netbook> Date: Sun, 07 Feb 2016 10:32:44 +0100 Message-ID: <87h9hkx3ur.fsf@elephly.net> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Zoho-Virus-Status: 1 X-Spam-Score: 1.0 (+) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 1.0 (+) Efraim Flashner writes: > On Wed, 03 Feb 2016 09:47:15 +0100 > ludo@gnu.org (Ludovic Courtès) wrote: > >> ludo@gnu.org (Ludovic Courtès) skribis: >> >> > An idea I haven’t taken the time to test yet would be to use >> > ‘properties’: >> > >> > (define python-foobar ;with Python 3 >> > (package >> > (name "foobar") >> > ;; Specify which Python 2 variant to use. >> > (properties `((python2-variant . ,(delay python2-foobar)))))) > > This part I don't get. What's the period for? The “properties” field holds a regular alist. Here the alist has one entry (a pair) with a symbol “python2-variant” as the key, and “,(delay python2-foobar)” as its value. The period is needed for the “dotted list” syntax, which is used to distinguish a pair (or an improper list) from a well-formed list. ~~ Ricardo From unknown Sat Aug 16 19:16:23 2025 X-Loop: help-debbugs@gnu.org Subject: bug#22437: Fixing package-with-python2 Resent-From: Andreas Enge Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Sun, 07 Feb 2016 11:10:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 22437 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: guix-devel , 22437@debbugs.gnu.org Received: via spool by 22437-submit@debbugs.gnu.org id=B22437.145484338224705 (code B ref 22437); Sun, 07 Feb 2016 11:10:02 +0000 Received: (at 22437) by debbugs.gnu.org; 7 Feb 2016 11:09:42 +0000 Received: from localhost ([127.0.0.1]:36484 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aSNDp-0006QP-TF for submit@debbugs.gnu.org; Sun, 07 Feb 2016 06:09:42 -0500 Received: from mailrelay6.public.one.com ([91.198.169.200]:28552) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aSNDn-0006Q8-VE for 22437@debbugs.gnu.org; Sun, 07 Feb 2016 06:09:40 -0500 X-HalOne-Cookie: a1623f85d856e8441d98a3a045b5ff3a86c85684 X-HalOne-ID: 43558f6e-cd8b-11e5-a8c0-b82a72d06996 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=enge.fr; s=20140924; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references; bh=ih4EgVfCvbwjcNcxAXIB6GeEkW4tVycKIYSkdNX39Wc=; b=B8/0Oomxlu7QYvSuVLKgeaC7qV/s6l5+b5lNUXIB1EaCjyN3WyJE+PnJMLtW5cB4jclFY4uLT/shX Sx3uA0cz523okS7LoabkQqcZJYBjbVdmQycy5iLjam3upRtWB272PTecNTNO7jRBmA5jI+Gw8I+h9P gBGxOJqz6Q0Jyzzg= Received: from debian (unknown [92.89.73.211]) by smtpfilter3.public.one.com (Halon Mail Gateway) with ESMTPSA; Sun, 7 Feb 2016 11:09:31 +0000 (UTC) Date: Sun, 7 Feb 2016 12:09:29 +0100 From: Andreas Enge Message-ID: <20160207110929.GA4968@debian> References: <87vb68nkyb.fsf@gnu.org> <87twlqxjsc.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <87twlqxjsc.fsf@gnu.org> User-Agent: Mutt/1.5.24 (2015-08-30) X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: 0.0 (/) Hello, this looks really good, but I do not understand why we need the additional private variable, for instance %python-cython: On Wed, Feb 03, 2016 at 09:47:15AM +0100, Ludovic Courts wrote: > -(define-public python-cython > +(define %python-cython > (package > (name "python-cython") > (version "0.23.4") > @@ -2946,8 +2946,13 @@ programming language and the extended Cython programming language. It makes > writing C extensions for Python as easy as Python itself.") > (license asl2.0))) > > +(define-public python-cython > + (package > + (inherit %python-cython) > + (properties `((python2-variant . ,(delay python2-cython)))))) > + > (define-public python2-cython > - (package (inherit (package-with-python2 python-cython)) > + (package (inherit (package-with-python2 %python-cython)) > (name "python2-cython") > (inputs If python2-cython inherits from (package-with-python2 python-cython), is not the only difference that it keeps the properties field? And would this not be harmless, as we are not going to call package-with-python2 again? Or would this create a circular dependency with (delay python2-cython)? (In C or Pascal, this would not be a problem, one could simply declare things before they are used, and that is it.) It would be more elegant to drop the additional variable if possible. Andreas From unknown Sat Aug 16 19:16:23 2025 X-Loop: help-debbugs@gnu.org Subject: bug#22437: Fixing package-with-python2 Resent-From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Sun, 07 Feb 2016 20:36:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 22437 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Ricardo Wurmus Cc: guix-devel , 22437@debbugs.gnu.org, Efraim Flashner Received: via spool by 22437-submit@debbugs.gnu.org id=B22437.145487735029733 (code B ref 22437); Sun, 07 Feb 2016 20:36:01 +0000 Received: (at 22437) by debbugs.gnu.org; 7 Feb 2016 20:35:50 +0000 Received: from localhost ([127.0.0.1]:37546 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aSW3i-0007jV-1D for submit@debbugs.gnu.org; Sun, 07 Feb 2016 15:35:50 -0500 Received: from eggs.gnu.org ([208.118.235.92]:57571) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aSW3f-0007jH-VC for 22437@debbugs.gnu.org; Sun, 07 Feb 2016 15:35:48 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aSW3X-0007Ns-Lm for 22437@debbugs.gnu.org; Sun, 07 Feb 2016 15:35:42 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.2 required=5.0 tests=BAYES_40,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:44082) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aSW3X-0007No-Id; Sun, 07 Feb 2016 15:35:39 -0500 Received: from reverse-83.fdn.fr ([80.67.176.83]:50600 helo=pluto) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1aSW3W-000256-N6; Sun, 07 Feb 2016 15:35:39 -0500 From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) References: <87vb68nkyb.fsf@gnu.org> <87twlqxjsc.fsf@gnu.org> <20160207101720.4a3be103@debian-netbook> <87h9hkx3ur.fsf@elephly.net> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 19 =?UTF-8?Q?Pluvi=C3=B4se?= an 224 de la =?UTF-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x3D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-unknown-linux-gnu Date: Sun, 07 Feb 2016 21:35:36 +0100 In-Reply-To: <87h9hkx3ur.fsf@elephly.net> (Ricardo Wurmus's message of "Sun, 07 Feb 2016 10:32:44 +0100") Message-ID: <8760y0tg13.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.3 (-----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.3 (-----) Ricardo Wurmus skribis: > Efraim Flashner writes: > >> On Wed, 03 Feb 2016 09:47:15 +0100 >> ludo@gnu.org (Ludovic Court=C3=A8s) wrote: >> >>> ludo@gnu.org (Ludovic Court=C3=A8s) skribis: >>>=20 >>> > An idea I haven=E2=80=99t taken the time to test yet would be to use >>> > =E2=80=98properties=E2=80=99: >>> > >>> > (define python-foobar ;with Python 3 >>> > (package >>> > (name "foobar") >>> > ;; Specify which Python 2 variant to use. >>> > (properties `((python2-variant . ,(delay python2-foobar)))))) >> >> This part I don't get. What's the period for? > > The =E2=80=9Cproperties=E2=80=9D field holds a regular alist. Here the a= list has one > entry (a pair) with a symbol =E2=80=9Cpython2-variant=E2=80=9D as the key= , and =E2=80=9C,(delay > python2-foobar)=E2=80=9D as its value. > > The period is needed for the =E2=80=9Cdotted list=E2=80=9D syntax, which = is used to > distinguish a pair (or an improper list) from a well-formed list. This is a relic of the old days and probably kind of confusing to newcomers, but since we started making this field an alist, let=E2=80=99s k= eep it this way. Ludo=E2=80=99. From unknown Sat Aug 16 19:16:23 2025 X-Loop: help-debbugs@gnu.org Subject: bug#22437: Fixing package-with-python2 Resent-From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Sun, 07 Feb 2016 20:40:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 22437 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Andreas Enge Cc: guix-devel , 22437@debbugs.gnu.org Received: via spool by 22437-submit@debbugs.gnu.org id=B22437.145487760030098 (code B ref 22437); Sun, 07 Feb 2016 20:40:02 +0000 Received: (at 22437) by debbugs.gnu.org; 7 Feb 2016 20:40:00 +0000 Received: from localhost ([127.0.0.1]:37550 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aSW7k-0007pO-K2 for submit@debbugs.gnu.org; Sun, 07 Feb 2016 15:40:00 -0500 Received: from eggs.gnu.org ([208.118.235.92]:58901) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aSW7j-0007pD-Vp for 22437@debbugs.gnu.org; Sun, 07 Feb 2016 15:40:00 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aSW7b-0008W6-Hy for 22437@debbugs.gnu.org; Sun, 07 Feb 2016 15:39:54 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:44119) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aSW7b-0008Vt-Eo; Sun, 07 Feb 2016 15:39:51 -0500 Received: from reverse-83.fdn.fr ([80.67.176.83]:50790 helo=pluto) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1aSW7V-0002jQ-1B; Sun, 07 Feb 2016 15:39:47 -0500 From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) References: <87vb68nkyb.fsf@gnu.org> <87twlqxjsc.fsf@gnu.org> <20160207110929.GA4968@debian> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 19 =?UTF-8?Q?Pluvi=C3=B4se?= an 224 de la =?UTF-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x3D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-unknown-linux-gnu Date: Sun, 07 Feb 2016 21:39:42 +0100 In-Reply-To: <20160207110929.GA4968@debian> (Andreas Enge's message of "Sun, 7 Feb 2016 12:09:29 +0100") Message-ID: <87vb60s19t.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.3 (-----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.3 (-----) Andreas Enge skribis: > this looks really good, but I do not understand why we need the > additional private variable, for instance %python-cython: Glad you noticed. :-) > On Wed, Feb 03, 2016 at 09:47:15AM +0100, Ludovic Court=C3=A8s wrote: >> -(define-public python-cython >> +(define %python-cython >> (package >> (name "python-cython") >> (version "0.23.4") >> @@ -2946,8 +2946,13 @@ programming language and the extended Cython prog= ramming language. It makes >> writing C extensions for Python as easy as Python itself.") >> (license asl2.0))) >>=20=20 >> +(define-public python-cython >> + (package >> + (inherit %python-cython) >> + (properties `((python2-variant . ,(delay python2-cython)))))) >> + >> (define-public python2-cython >> - (package (inherit (package-with-python2 python-cython)) >> + (package (inherit (package-with-python2 %python-cython)) >> (name "python2-cython") >> (inputs > > If python2-cython inherits from (package-with-python2 python-cython), > is not the only difference that it keeps the properties field? And > would this not be harmless, as we are not going to call package-with-pyth= on2 > again? Or would this create a circular dependency with (delay python2-cyt= hon)? So I thought! In hindsight, I think this is unnecessary. > (In C or Pascal, this would not be a problem I can=E2=80=99t wait to see =E2=80=9CPasix=E2=80=9D! :-) Ludo=E2=80=99. From unknown Sat Aug 16 19:16:23 2025 X-Loop: help-debbugs@gnu.org Subject: bug#22437: Fixing package-with-python2 Resent-From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Sun, 07 Feb 2016 20:43:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 22437 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Efraim Flashner Cc: guix-devel , 22437@debbugs.gnu.org Received: via spool by 22437-submit@debbugs.gnu.org id=B22437.145487775730360 (code B ref 22437); Sun, 07 Feb 2016 20:43:01 +0000 Received: (at 22437) by debbugs.gnu.org; 7 Feb 2016 20:42:37 +0000 Received: from localhost ([127.0.0.1]:37565 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aSWAH-0007tb-7r for submit@debbugs.gnu.org; Sun, 07 Feb 2016 15:42:37 -0500 Received: from eggs.gnu.org ([208.118.235.92]:60129) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aSWAF-0007tO-FC for 22437@debbugs.gnu.org; Sun, 07 Feb 2016 15:42:35 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aSWA9-000121-Kj for 22437@debbugs.gnu.org; Sun, 07 Feb 2016 15:42:30 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-0.7 required=5.0 tests=BAYES_05,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:44145) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aSWA9-00011t-HC; Sun, 07 Feb 2016 15:42:29 -0500 Received: from reverse-83.fdn.fr ([80.67.176.83]:50914 helo=pluto) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1aSWA8-00038v-Gc; Sun, 07 Feb 2016 15:42:29 -0500 From: ludo@gnu.org (Ludovic =?UTF-8?Q?Court=C3=A8s?=) References: <87vb68nkyb.fsf@gnu.org> <87twlqxjsc.fsf@gnu.org> <20160207101720.4a3be103@debian-netbook> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 19 =?UTF-8?Q?Pluvi=C3=B4se?= an 224 de la =?UTF-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x3D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-unknown-linux-gnu Date: Sun, 07 Feb 2016 21:42:26 +0100 In-Reply-To: <20160207101720.4a3be103@debian-netbook> (Efraim Flashner's message of "Sun, 7 Feb 2016 10:17:20 +0200") Message-ID: <87r3gos159.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.3 (-----) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.3 (-----) Efraim Flashner skribis: > On Wed, 03 Feb 2016 09:47:15 +0100 > ludo@gnu.org (Ludovic Court=C3=A8s) wrote: [...] >> This will trigger rebuilds (but with an identical result) because in >> manually-written variants we would use =E2=80=9Cpython2-foo=E2=80=9D as = the label of >> inputs, whereas the automatic transformations keeps the original >> =E2=80=9Cpython-foo=E2=80=9D label. > > rebuilds python-foo and python2-foo, or just the python2- variants? The latter. >> What do people think? > > I like it. It keeps the logic in the build-system. In terms of a speed te= st > when figuring out the build/dependancy graph, how does it affect the time= of > `guix graph python2-scipy python2-matplotlib`? It might be slightly faster, but it=E2=80=99s already rather fast. :-) --8<---------------cut here---------------start------------->8--- $ time guix graph python2-scipy python2-matplotlib >/dev/null real 0m0.664s user 0m0.768s sys 0m0.056s --8<---------------cut here---------------end--------------->8--- [...] >> Does that make sense? Any takers? (This can be done incrementally.) > > It fits our "one change per commit" policy, and if we don't start at the = base > of the pyramid we'll be modifying and then removing the special variants.= I > don't mind doing the conversion process. OK. > Thinking aloud, I think for the time being we should keep the > python-setuptools that are already part of the python- variants where they > are and save that for another time. Agreed. Thanks for your feedback! Ludo=E2=80=99. From unknown Sat Aug 16 19:16:23 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Leo Famulari Subject: bug#22437: closed (Re: bug#22437: Fixing package-with-python2) Message-ID: References: <874mdjgrtz.fsf@gnu.org> <20160122195242.GA26196@jasmine> X-Gnu-PR-Message: they-closed 22437 X-Gnu-PR-Package: guix Reply-To: 22437@debbugs.gnu.org Date: Mon, 08 Feb 2016 18:13:05 +0000 Content-Type: multipart/mixed; boundary="----------=_1454955185-2578-1" This is a multi-part message in MIME format... ------------=_1454955185-2578-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #22437: Problems with non-auto-translated python-2 package variants which was filed against the guix package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 22437@debbugs.gnu.org. --=20 22437: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D22437 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1454955185-2578-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 22437-done) by debbugs.gnu.org; 8 Feb 2016 18:12:12 +0000 Received: from localhost ([127.0.0.1]:60330 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aSqIG-0000d4-7m for submit@debbugs.gnu.org; Mon, 08 Feb 2016 13:12:12 -0500 Received: from eggs.gnu.org ([208.118.235.92]:43544) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aSqIB-0000b7-MO for 22437-done@debbugs.gnu.org; Mon, 08 Feb 2016 13:12:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aSnTH-0002du-3t for 22437-done@debbugs.gnu.org; Mon, 08 Feb 2016 10:11:28 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-2.2 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD autolearn=disabled version=3.3.2 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:59310) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aSnTH-0002do-1F; Mon, 08 Feb 2016 10:11:23 -0500 Received: from pluto.bordeaux.inria.fr ([193.50.110.57]:60942 helo=pluto) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1aSnTG-0002wQ-Ac; Mon, 08 Feb 2016 10:11:22 -0500 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) To: Efraim Flashner Subject: Re: bug#22437: Fixing package-with-python2 References: <87vb68nkyb.fsf@gnu.org> <87twlqxjsc.fsf@gnu.org> <20160207101720.4a3be103@debian-netbook> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 20 =?utf-8?Q?Pluvi=C3=B4se?= an 224 de la =?utf-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x3D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-unknown-linux-gnu Date: Mon, 08 Feb 2016 16:11:20 +0100 In-Reply-To: <20160207101720.4a3be103@debian-netbook> (Efraim Flashner's message of "Sun, 7 Feb 2016 10:17:20 +0200") Message-ID: <874mdjgrtz.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-Spam-Score: -5.3 (-----) X-Debbugs-Envelope-To: 22437-done Cc: guix-devel , 22437-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.3 (-----) I=E2=80=99ve pushed the =E2=80=98python2-variant=E2=80=99 trick as 1be8334.= Subsequent commits use it for a bunch of packages. I=E2=80=99ll let others handle the remaining packages where this would help. :-) Closing the bug! Ludo=E2=80=99. ------------=_1454955185-2578-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 22 Jan 2016 19:52:56 +0000 Received: from localhost ([127.0.0.1]:58105 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aMhlP-0006ZF-Tc for submit@debbugs.gnu.org; Fri, 22 Jan 2016 14:52:56 -0500 Received: from eggs.gnu.org ([208.118.235.92]:56313) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aMhlO-0006Z1-2J for submit@debbugs.gnu.org; Fri, 22 Jan 2016 14:52:54 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aMhlH-0006Aw-P1 for submit@debbugs.gnu.org; Fri, 22 Jan 2016 14:52:48 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=BAYES_40,T_DKIM_INVALID autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:45613) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aMhlH-0006Ar-MN for submit@debbugs.gnu.org; Fri, 22 Jan 2016 14:52:47 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47279) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aMhlG-00081q-Fe for bug-guix@gnu.org; Fri, 22 Jan 2016 14:52:47 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aMhlB-00069P-GZ for bug-guix@gnu.org; Fri, 22 Jan 2016 14:52:46 -0500 Received: from out3-smtp.messagingengine.com ([66.111.4.27]:49827) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aMhlA-000680-JV for bug-guix@gnu.org; Fri, 22 Jan 2016 14:52:41 -0500 Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.nyi.internal (Postfix) with ESMTP id 0361820E54; Fri, 22 Jan 2016 14:52:39 -0500 (EST) Received: from frontend1 ([10.202.2.160]) by compute2.internal (MEProxy); Fri, 22 Jan 2016 14:52:40 -0500 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=famulari.name; h= content-type:date:from:message-id:mime-version:subject:to :x-sasl-enc:x-sasl-enc; s=mesmtp; bh=x6VIMlcZEEzlR6WyCmHrbISpZx4 =; b=NB6RqV1lBOACJ2nyVB2nA2ZOtQhd3kVDCS1e29KRYgGoSlF73zSjBQ1QNe0 /0U8vDO+BHTybm7XBF5i/IlDM4h2Bsp5zo9Cq68qWZMfs3InC16iiysNvmSU1ynN A4AHJg5jKO6VEF3IB9IB1e08psVTbBz9sRhSG0R7SoXp2ZRU= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=content-type:date:from:message-id :mime-version:subject:to:x-sasl-enc:x-sasl-enc; s=smtpout; bh=x6 VIMlcZEEzlR6WyCmHrbISpZx4=; b=lsXAueGMH1xrOfJQyW0vFk0e+Cc6yOsJVi RNp+hZWmy6KFf08vEKU0LMKMkgcY9ON/eFYfBW6kueqXHk4AuHzrPOrLh8QnHqgO 8i+TbZBLmW4MQNdlrJVuNguYdklVaBwTeMvEqUW3B/NSuiMSERcRetFI6QodiMZt mjac6rJ50= X-Sasl-enc: Bx0keuAI/WD/+R1cgBJgXhSHb2VBzi8HaWdNFPMIBPdU 1453492359 Received: from localhost (c-68-81-58-201.hsd1.pa.comcast.net [68.81.58.201]) by mail.messagingengine.com (Postfix) with ESMTPA id AAC6FC013FE for ; Fri, 22 Jan 2016 14:52:39 -0500 (EST) Date: Fri, 22 Jan 2016 14:52:42 -0500 From: Leo Famulari To: bug-guix@gnu.org Subject: Problems with non-auto-translated python-2 package variants Message-ID: <20160122195242.GA26196@jasmine> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.24 (2015-08-30) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -4.1 (----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -4.1 (----) Python-2 variants of python-3 packages that are not automatically translated by package-with-python2 are not used by auto-translated python-2 packages. For example, python2-cryptography requires python2-ipaddress. This is not required by python-cryptography: http://git.savannah.gnu.org/cgit/guix.git/tree/gnu/packages/python.scm#n5838 Python-oauthlib requires python-cryptography, and thus cannot be translated wholly by package-with-python2. Package-with-python2 fails to refer to the "hand-made" python2-cryptography that includes python2-ipaddress, and insteads attempts to generate it automatically. This results in a failed build of python2-cryptopgraphy because python2-ipaddress is not being provided. The solution is to remove python-cryptography from python2-oauthlib and provide python2-cryptography "by hand": http://git.savannah.gnu.org/cgit/guix.git/tree/gnu/packages/python.scm#n2333 This is especially annoying when a python-2 variant needs to refer to more than one of these "hand-made" python-2 packages: http://lists.gnu.org/archive/html/guix-devel/2015-12/msg00921.html There are many python-3 packages that include python-setuptools, even though they build without it. I assume this is to easily take advantage of package-with-python2. Some context: bug: python2 versions of packages failing as inputs http://debbugs.gnu.org/cgi/bugreport.cgi?bug=22013 guix-devel: Python2-jsonschema fails: http://lists.gnu.org/archive/html/guix-devel/2016-01/msg00604.html guix-devel: Split acme into both Python variants http://lists.gnu.org/archive/html/guix-devel/2015-12/msg00921.html ------------=_1454955185-2578-1--