all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [PATCH] IPython: Use 'python2-variant'.
@ 2016-04-17  0:54 Ben Woodcroft
  2016-04-18 19:07 ` Leo Famulari
  0 siblings, 1 reply; 7+ messages in thread
From: Ben Woodcroft @ 2016-04-17  0:54 UTC (permalink / raw)
  To: guix-devel@gnu.org

[-- Attachment #1: Type: text/plain, Size: 435 bytes --]

Hi,

This hopefully should be a pretty straightforward patch, but I just 
wanted to check that I was doing the correct thing this first time. 
Seems to make the code much cleaner.

Does it make sense to go through all the python packages and convert 
them all to the python2-variant style? As I understand the idea is to do 
this one package per commit, which means traversing python dependency 
graph? Is anyone on this?

Thanks,
ben

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gnu-python-ipython-Use-python2-variant.patch --]
[-- Type: text/x-patch; name="0001-gnu-python-ipython-Use-python2-variant.patch", Size: 2795 bytes --]

From 86d94c052a0ff755e28fbd970b71f87dbba022af Mon Sep 17 00:00:00 2001
From: Ben Woodcroft <donttrustben@gmail.com>
Date: Sat, 16 Apr 2016 23:10:26 +1000
Subject: [PATCH] gnu: python-ipython: Use 'python2-variant'.

* gnu/packages/python.scm (python-ipython)[properties]: New field.
(python2-ipython): Use 'strip-python2-variant'.
---
 gnu/packages/python.scm | 28 ++++++++++------------------
 1 file changed, 10 insertions(+), 18 deletions(-)

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index 4238965..e6fa127 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -12,7 +12,7 @@
 ;;; Copyright © 2015 Eric Dvorsak <eric@dvorsak.fr>
 ;;; Copyright © 2015, 2016 David Thompson <davet@gnu.org>
 ;;; Copyright © 2015, 2016 Leo Famulari <leo@famulari.name>
-;;; Copyright © 2015 Ben Woodcroft <donttrustben@gmail.com>
+;;; Copyright © 2015, 2016 Ben Woodcroft <donttrustben@gmail.com>
 ;;; Copyright © 2015, 2016 Erik Edrosa <erik.edrosa@gmail.com>
 ;;; Copyright © 2015, 2016 Efraim Flashner <efraim@flashner.co.il>
 ;;; Copyright © 2015 Kyle Meyer <kyle@kyleam.com>
@@ -4357,29 +4357,21 @@ without using the configuration machinery.")
 Powerful interactive shells, a browser-based notebook, support for interactive
 data visualization, embeddable interpreters and tools for parallel
 computing.")
-    (license bsd-3)))
+    (license bsd-3)
+    (properties `((python2-variant . ,(delay python2-ipython))))))
 
 (define-public python2-ipython
-  (let ((ipython (package-with-python2 python-ipython)))
+  (let ((parent (package-with-python2
+                 (strip-python2-variant python-ipython))))
     (package
-      (inherit ipython)
+      (inherit parent)
       ;; FIXME: some tests are failing
-      (arguments
-       `(#:tests? #f ,@(package-arguments ipython)))
-      ;; Make sure we use custom python2-NAME packages.
       ;; FIXME: add pyreadline once available.
-      (propagated-inputs
-       `(("python2-terminado" ,python2-terminado)
-         ,@(alist-delete "python-terminado"
-                         (package-propagated-inputs ipython))))
+      (arguments
+       `(#:tests? #f ,@(package-arguments parent)))
       (inputs
-       `(("python2-jsonschema" ,python2-jsonschema)
-         ("python2-mock" ,python2-mock)
-         ("python2-matplotlib" ,python2-matplotlib)
-         ("python2-numpy" ,python2-numpy)
-         ("python2-requests" ,python2-requests)
-         ,@(fold alist-delete (package-inputs ipython)
-                 '("python-jsonschema" "python-matplotlib" "python-numpy" "python-requests")))))))
+       `(("python2-mock" ,python2-mock)
+         ,@(package-inputs parent))))))
 
 (define-public python-isodate
   (package
-- 
2.6.3


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

end of thread, other threads:[~2016-04-26  9:52 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-17  0:54 [PATCH] IPython: Use 'python2-variant' Ben Woodcroft
2016-04-18 19:07 ` Leo Famulari
2016-04-19  9:15   ` Ben Woodcroft
2016-04-20  1:16     ` Leo Famulari
2016-04-21 18:49   ` Hartmut Goebel
2016-04-26  9:52     ` ‘package-with-python2’ and ‘strip-python2-variant’ Ludovic Courtès
2016-04-21 18:51   ` [PATCH] IPython: Use 'python2-variant' Hartmut Goebel

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.