unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [PATCH] gnu: python: Variable names containing versions
@ 2016-05-18 17:01 Hartmut Goebel
  2016-05-19 12:27 ` Ludovic Courtès
  0 siblings, 1 reply; 2+ messages in thread
From: Hartmut Goebel @ 2016-05-18 17:01 UTC (permalink / raw)
  To: guix-devel

Hi,

as discussed earlier on the mailinglist, here is a patch adding "versioned"
Python variables.

python -> python-3 -> python-3.4
python-2 -> python-2.7

This allows to still specify "current Python 3.4.x release" even after we
updated python-3 to python-3.5. python-2.7 is for symetry only, as there will
be no Python 2.8.

From 793917a37a32d89d98da93a1315635d4506f40c1 Mon Sep 17 00:00:00 2001
From: Hartmut Goebel <h.goebel@crazy-compilers.com>
Date: Sun, 15 May 2016 11:51:54 +0200
Subject: [PATCH] gnu: python: Variable names containing versions

* gnu/packages/python.scm (python-2): Rename variable to...
  (python-2.7): ...this.
  (python-2): Refer to "python-2.7".
  (python): Rename variable to...
  (python-3.4): ...this.
  (python-3): Refer to "python-3.4".
  (python): Refer to "python-3".
---
 gnu/packages/python.scm | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index 7593fc7..08065ea 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -90,7 +90,7 @@
   #:use-module (guix build-system trivial)
   #:use-module (srfi srfi-1))
 
-(define-public python-2
+(define-public python-2.7
   (package
     (name "python")
     (version "2.7.10")
@@ -262,7 +262,9 @@ packages; exception-based error handling; and very high level dynamic
 data types.")
     (license psfl)))
 
-(define-public python
+(define-public python-2 python-2.7)
+
+(define-public python-3.4
   (package (inherit python-2)
     (version "3.4.3")
     (source (origin
@@ -288,6 +290,12 @@ data types.")
                                         (version-major+minor version)
                                         "/site-packages"))))))))
 
+; our current Python 3 release is Python 3.4
+(define-public python-3 python-3.4)
+
+; our current default python is python 3
+(define-public python python-3)
+
 ;; Minimal variants of Python, mostly used to break the cycle between Tk and
 ;; Python (Tk -> libxcb -> Python.)
 
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] gnu: python: Variable names containing versions
  2016-05-18 17:01 [PATCH] gnu: python: Variable names containing versions Hartmut Goebel
@ 2016-05-19 12:27 ` Ludovic Courtès
  0 siblings, 0 replies; 2+ messages in thread
From: Ludovic Courtès @ 2016-05-19 12:27 UTC (permalink / raw)
  To: Hartmut Goebel; +Cc: guix-devel

Hartmut Goebel <h.goebel@crazy-compilers.com> skribis:

> as discussed earlier on the mailinglist, here is a patch adding "versioned"
> Python variables.
>
> python -> python-3 -> python-3.4
> python-2 -> python-2.7
>
> This allows to still specify "current Python 3.4.x release" even after we
> updated python-3 to python-3.5. python-2.7 is for symetry only, as there will
> be no Python 2.8.
>
>From 793917a37a32d89d98da93a1315635d4506f40c1 Mon Sep 17 00:00:00 2001
> From: Hartmut Goebel <h.goebel@crazy-compilers.com>
> Date: Sun, 15 May 2016 11:51:54 +0200
> Subject: [PATCH] gnu: python: Variable names containing versions
>
> * gnu/packages/python.scm (python-2): Rename variable to...
>   (python-2.7): ...this.
>   (python-2): Refer to "python-2.7".
>   (python): Rename variable to...
>   (python-3.4): ...this.
>   (python-3): Refer to "python-3.4".
>   (python): Refer to "python-3".

Applied (I slightly tweaked the comments).  Thanks!

Ludo’.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-05-19 12:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-18 17:01 [PATCH] gnu: python: Variable names containing versions Hartmut Goebel
2016-05-19 12:27 ` Ludovic Courtès

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).