From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ricardo Wurmus Subject: [PATCH] Add numexpr Date: Tue, 13 Oct 2015 15:18:03 +0200 Message-ID: Mime-Version: 1.0 Content-Type: text/x-patch Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:58718) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZlzT5-00027d-Vi for guix-devel@gnu.org; Tue, 13 Oct 2015 09:18:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZlzT3-0003T9-7g for guix-devel@gnu.org; Tue, 13 Oct 2015 09:18:15 -0400 Received: from sinope.bbbm.mdc-berlin.de ([141.80.25.23]:36598) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZlzT2-0003Sr-Qy for guix-devel@gnu.org; Tue, 13 Oct 2015 09:18:13 -0400 Received: from localhost (localhost [127.0.0.1]) by sinope.bbbm.mdc-berlin.de (Postfix) with ESMTP id BA3E228053F for ; Tue, 13 Oct 2015 15:18:11 +0200 (CEST) Received: from sinope.bbbm.mdc-berlin.de ([127.0.0.1]) by localhost (sinope.bbbm.mdc-berlin.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id PsXKMWjh9U7U for ; Tue, 13 Oct 2015 15:18:05 +0200 (CEST) Received: from HTCAONE.mdc-berlin.net (mab.citx.mdc-berlin.de [141.80.36.102]) by sinope.bbbm.mdc-berlin.de (Postfix) with ESMTP for ; Tue, 13 Oct 2015 15:18:05 +0200 (CEST) Content-Disposition: inline; filename="0001-gnu-Add-python-numexpr.patch" List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: "guix-devel@gnu.org" >From dd27466baaf072214fe5d6663df09105890d88ed Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus 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