unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [PATCH] Add numexpr
@ 2015-10-13 13:18 Ricardo Wurmus
  2015-10-14 20:16 ` Ludovic Courtès
  0 siblings, 1 reply; 2+ messages in thread
From: Ricardo Wurmus @ 2015-10-13 13:18 UTC (permalink / raw)
  To: guix-devel@gnu.org

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: 0001-gnu-Add-python-numexpr.patch --]
[-- Type: text/x-patch, Size: 2371 bytes --]

From dd27466baaf072214fe5d6663df09105890d88ed Mon Sep 17 00:00:00 2001
From: Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de>
Date: Tue, 13 Oct 2015 14:56:15 +0200
Subject: [PATCH 1/2] gnu: Add python-numexpr.

* gnu/packages/python.scm (python-numexpr, python2-numexpr): New
  variables.
---
 gnu/packages/python.scm | 37 +++++++++++++++++++++++++++++++++++++
 1 file changed, 37 insertions(+)

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index fdc4410..7e00711 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -3058,6 +3058,43 @@ that client code uses to construct the grammar directly in Python code.")
 (define-public python2-numpydoc
   (package-with-python2 python-numpydoc))
 
+(define-public python-numexpr
+  (package
+    (name "python-numexpr")
+    (version "2.4.4")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "https://pypi.python.org/packages/source/"
+                           "n/numexpr/numexpr-" version ".tar.gz"))
+       (sha256
+        (base32
+         "0nsnff5312fm38w6dm34bw7ghfqqy8vl9gig0al963h4mz8zm8nz"))))
+    (build-system python-build-system)
+    (arguments `(#:tests? #f))          ; no tests included
+    (propagated-inputs
+     `(("python-numpy" ,python-numpy)))
+    (home-page "https://github.com/pydata/numexpr")
+    (synopsis "Fast numerical expression evaluator for NumPy")
+    (description
+     "Numexpr is a fast numerical expression evaluator for NumPy.  With it,
+expressions that operate on arrays are accelerated and use less memory than
+doing the same calculation in Python.  In addition, its multi-threaded
+capabilities can make use of all your cores, which may accelerate
+computations, most specially if they are not memory-bounded (e.g. those using
+transcendental functions).")
+    (license license:expat)))
+
+(define-public python2-numexpr
+  (let ((numexpr (package-with-python2 python-numexpr)))
+    (package (inherit numexpr)
+      ;; Make sure to use special packages for Python 2 instead
+      ;; of those automatically rewritten by package-with-python2.
+      (propagated-inputs
+       `(("python2-numpy" ,python2-numpy)
+         ,@(alist-delete "python-numpy"
+                         (package-propagated-inputs numexpr)))))))
+
 (define-public python-matplotlib
   (package
     (name "python-matplotlib")
-- 
2.1.0

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

* Re: [PATCH] Add numexpr
  2015-10-13 13:18 [PATCH] Add numexpr Ricardo Wurmus
@ 2015-10-14 20:16 ` Ludovic Courtès
  0 siblings, 0 replies; 2+ messages in thread
From: Ludovic Courtès @ 2015-10-14 20:16 UTC (permalink / raw)
  To: Ricardo Wurmus; +Cc: guix-devel@gnu.org

Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de> skribis:

> From dd27466baaf072214fe5d6663df09105890d88ed Mon Sep 17 00:00:00 2001
> From: Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de>
> Date: Tue, 13 Oct 2015 14:56:15 +0200
> Subject: [PATCH 1/2] gnu: Add python-numexpr.
>
> * gnu/packages/python.scm (python-numexpr, python2-numexpr): New
>   variables.

Okay!  Thanks!

Ludo’.

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

end of thread, other threads:[~2015-10-14 20:17 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-13 13:18 [PATCH] Add numexpr Ricardo Wurmus
2015-10-14 20:16 ` 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).