* [PATCH] Add sympy, scikit-image, pandas, seaborn.
@ 2015-04-29 13:24 Ricardo Wurmus
2015-05-03 19:41 ` Ludovic Courtès
0 siblings, 1 reply; 3+ messages in thread
From: Ricardo Wurmus @ 2015-04-29 13:24 UTC (permalink / raw)
To: Guix-devel
[-- Attachment #1: Type: text/plain, Size: 92 bytes --]
Hi Guix,
attached are package definitions for four scientific Python modules.
~~ Ricardo
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gnu-Add-python-sympy.patch --]
[-- Type: text/x-patch, Size: 1760 bytes --]
From 6b403eda6e4ba959ef01a1b688b22d303882658e Mon Sep 17 00:00:00 2001
From: Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de>
Date: Wed, 29 Apr 2015 15:03:24 +0200
Subject: [PATCH 1/4] gnu: Add python-sympy.
* gnu/packages/python.scm (python-sympy, python2-sympy): New variables.
---
gnu/packages/python.scm | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+)
diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index 29b47f3..98be765 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -3446,6 +3446,32 @@ providing a clean and modern domain specific specification language (DSL) in
Python style, together with a fast and comfortable execution environment.")
(license license:expat)))
+(define-public python-sympy
+ (package
+ (name "python-sympy")
+ (version "0.7.6")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append
+ "https://github.com/sympy/sympy/releases/download/sympy-"
+ version "/sympy-" version ".tar.gz"))
+ (sha256
+ (base32 "19yp0gy4i7p4g6l3b8vaqkj9qj7yqb5kqy0qgbdagpzgkdz958yz"))))
+ (build-system python-build-system)
+ (native-inputs
+ `(("python-setuptools" ,python-setuptools)))
+ (home-page "http://www.sympy.org/")
+ (synopsis "Python library for symbolic mathematics")
+ (description
+ "SymPy is a Python library for symbolic mathematics. It aims to become a
+full-featured computer algebra system (CAS) while keeping the code as simple
+as possible in order to be comprehensible and easily extensible.")
+ (license bsd-3)))
+
+(define-public python2-sympy
+ (package-with-python2 python-sympy))
+
(define-public python-testlib
(package
(name "python-testlib")
--
2.1.0
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #3: 0002-gnu-Add-python-scikit-image.patch --]
[-- Type: text/x-patch, Size: 2106 bytes --]
From 7dab1d810e19c185b8afc756e22dd54e8bcd3ca0 Mon Sep 17 00:00:00 2001
From: Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de>
Date: Wed, 29 Apr 2015 15:04:09 +0200
Subject: [PATCH 2/4] gnu: Add python-scikit-image.
* gnu/packages/python.scm (python-scikit-image, python2-scikit-image): New
variables.
---
gnu/packages/python.scm | 36 ++++++++++++++++++++++++++++++++++++
1 file changed, 36 insertions(+)
diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index 98be765..0289697 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -2065,6 +2065,42 @@ mining and data analysis.")
(alist-delete
"python-scipy" (package-propagated-inputs scikit))))))))
+(define-public python-scikit-image
+ (package
+ (name "python-scikit-image")
+ (version "0.11.3")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append
+ "https://pypi.python.org/packages/source/s/scikit-image/scikit-image-"
+ version ".tar.gz"))
+ (sha256
+ (base32 "0jz416fqvpahqyffw8plmszzfj669w8wvf3y9clnr5lr6a7md3kn"))))
+ (build-system python-build-system)
+ (inputs
+ `(("python-matplotlib" ,python-matplotlib)
+ ("python-networkx" ,python-networkx)
+ ("python-numpy" ,python-numpy)
+ ("python-scipy" ,python-scipy)
+ ("python-six" ,python-six)
+ ("python-pillow" ,python-pillow)))
+ (native-inputs
+ `(("python-cython" ,python-cython)
+ ("python-setuptools" ,python-setuptools)))
+ (home-page "http://scikit-image.org/")
+ (synopsis "Image processing in Python")
+ (description
+ "scikit-image is a collection of algorithms for image processing.")
+ (license bsd-3)))
+
+(define-public python2-scikit-image
+ (let ((scikit-image (package-with-python2 python-scikit-image)))
+ (package (inherit scikit-image)
+ (inputs `(("python2-mock" ,python2-mock)
+ ("python2-pytz" ,python2-pytz)
+ ,@(package-inputs scikit-image))))))
+
(define-public python-cython
(package
(name "python-cython")
--
2.1.0
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #4: 0003-gnu-Add-python-pandas.patch --]
[-- Type: text/x-patch, Size: 2190 bytes --]
From b1c795128c27183989df76f27ade11a7c4ba3ff8 Mon Sep 17 00:00:00 2001
From: Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de>
Date: Wed, 29 Apr 2015 15:14:56 +0200
Subject: [PATCH 3/4] gnu: Add python-pandas.
* gnu/packages/python.scm (python-pandas, python2-pandas): New variables.
---
gnu/packages/python.scm | 38 ++++++++++++++++++++++++++++++++++++++
1 file changed, 38 insertions(+)
diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index 0289697..e2ca01e 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -628,6 +628,44 @@ datetime module, available in Python 2.3+.")
"Parse human-readable date/time text")
(license asl2.0)))
+(define-public python-pandas
+ (package
+ (name "python-pandas")
+ (version "0.16.0")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append "https://pypi.python.org/packages/source/p/"
+ "pandas/pandas-" version ".tar.gz"))
+ (sha256
+ (base32 "1wfrp8dx1zcsry6f09ndza6qm1yr7f163211f4l9vjlnhxpxw4s0"))))
+ (build-system python-build-system)
+ (arguments
+ `(;; Three tests fail:
+ ;; - test_read_google
+ ;; - test_read_yahoo
+ ;; - test_month_range_union_tz_dateutil
+ #:tests? #f))
+ (inputs
+ `(("python-pytz" ,python-pytz)
+ ("python-numpy" ,python-numpy)
+ ("python-dateutil" ,python-dateutil-2)))
+ (native-inputs
+ `(("python-nose" ,python-nose)
+ ("python-setuptools" ,python-setuptools)))
+ (home-page "http://pandas.pydata.org")
+ (synopsis "Data structures for data analysis, time series, and statistics")
+ (description
+ "Pandas is a Python package providing fast, flexible, and expressive data
+structures designed to make working with structured (tabular,
+multidimensional, potentially heterogeneous) and time series data both easy
+and intuitive. It aims to be the fundamental high-level building block for
+doing practical, real world data analysis in Python.")
+ (license bsd-3)))
+
+(define-public python2-pandas
+ (package-with-python2 python-pandas))
+
(define-public python-tzlocal
(package
(name "python-tzlocal")
--
2.1.0
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #5: 0004-gnu-Add-python-seaborn.patch --]
[-- Type: text/x-patch, Size: 2173 bytes --]
From e989d4f61cc71a2535bd713760efe93b985d0fb8 Mon Sep 17 00:00:00 2001
From: Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de>
Date: Wed, 29 Apr 2015 15:19:38 +0200
Subject: [PATCH 4/4] gnu: Add python-seaborn.
* gnu/packages/python.scm (python-seaborn, python2-seaborn): New variables.
---
gnu/packages/python.scm | 35 +++++++++++++++++++++++++++++++++++
1 file changed, 35 insertions(+)
diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index e2ca01e..a4701aa 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -3520,6 +3520,41 @@ providing a clean and modern domain specific specification language (DSL) in
Python style, together with a fast and comfortable execution environment.")
(license license:expat)))
+(define-public python-seaborn
+ (package
+ (name "python-seaborn")
+ (version "0.5.1")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append
+ "https://pypi.python.org/packages/source/s/seaborn/seaborn-"
+ version ".tar.gz"))
+ (sha256
+ (base32 "1236abw18ijjglmv60q85ckqrvgf5qyy4zlq7nz5aqfg6q87z3wc"))))
+ (build-system python-build-system)
+ (inputs
+ `(("python-pandas" ,python-pandas)
+ ("python-numpy" ,python-numpy)
+ ("python-scipy" ,python-scipy)
+ ("python-matplotlib" ,python-matplotlib)))
+ (native-inputs
+ `(("python-setuptools" ,python-setuptools)))
+ (home-page "http://stanford.edu/~mwaskom/software/seaborn/")
+ (synopsis "Statistical data visualization")
+ (description
+ "Seaborn is a library for making attractive and informative statistical
+graphics in Python. It is built on top of matplotlib and tightly integrated
+with the PyData stack, including support for numpy and pandas data structures
+and statistical routines from scipy and statsmodels.")
+ (license bsd-3)))
+
+(define-public python2-seaborn
+ (let ((seaborn (package-with-python2 python-seaborn)))
+ (package (inherit seaborn)
+ (inputs `(("python2-pytz" ,python2-pytz)
+ ,@(package-inputs seaborn))))))
+
(define-public python-sympy
(package
(name "python-sympy")
--
2.1.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] Add sympy, scikit-image, pandas, seaborn.
2015-04-29 13:24 [PATCH] Add sympy, scikit-image, pandas, seaborn Ricardo Wurmus
@ 2015-05-03 19:41 ` Ludovic Courtès
2015-05-15 14:39 ` Ricardo Wurmus
0 siblings, 1 reply; 3+ messages in thread
From: Ludovic Courtès @ 2015-05-03 19:41 UTC (permalink / raw)
To: Ricardo Wurmus; +Cc: Guix-devel
Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de> skribis:
> From 6b403eda6e4ba959ef01a1b688b22d303882658e Mon Sep 17 00:00:00 2001
> From: Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de>
> Date: Wed, 29 Apr 2015 15:03:24 +0200
> Subject: [PATCH 1/4] gnu: Add python-sympy.
>
> * gnu/packages/python.scm (python-sympy, python2-sympy): New variables.
OK.
> From 7dab1d810e19c185b8afc756e22dd54e8bcd3ca0 Mon Sep 17 00:00:00 2001
> From: Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de>
> Date: Wed, 29 Apr 2015 15:04:09 +0200
> Subject: [PATCH 2/4] gnu: Add python-scikit-image.
>
> * gnu/packages/python.scm (python-scikit-image, python2-scikit-image): New
> variables.
[...]
> + (inputs
> + `(("python-matplotlib" ,python-matplotlib)
> + ("python-networkx" ,python-networkx)
> + ("python-numpy" ,python-numpy)
> + ("python-scipy" ,python-scipy)
> + ("python-six" ,python-six)
> + ("python-pillow" ,python-pillow)))
Should these be propagated, or does it work somehow when only scikit is
installed in a profile/build environment and one runs ‘import scikit’?
Otherwise OK.
> From b1c795128c27183989df76f27ade11a7c4ba3ff8 Mon Sep 17 00:00:00 2001
> From: Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de>
> Date: Wed, 29 Apr 2015 15:14:56 +0200
> Subject: [PATCH 3/4] gnu: Add python-pandas.
>
> * gnu/packages/python.scm (python-pandas, python2-pandas): New variables.
[...]
> + (inputs
> + `(("python-pytz" ,python-pytz)
> + ("python-numpy" ,python-numpy)
> + ("python-dateutil" ,python-dateutil-2)))
Same question, but otherwise OK.
> From e989d4f61cc71a2535bd713760efe93b985d0fb8 Mon Sep 17 00:00:00 2001
> From: Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de>
> Date: Wed, 29 Apr 2015 15:19:38 +0200
> Subject: [PATCH 4/4] gnu: Add python-seaborn.
>
> * gnu/packages/python.scm (python-seaborn, python2-seaborn): New variables.
[...]
> + (inputs
> + `(("python-pandas" ,python-pandas)
> + ("python-numpy" ,python-numpy)
> + ("python-scipy" ,python-scipy)
> + ("python-matplotlib" ,python-matplotlib)))
Ditto.
Thanks!
Ludo’.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Add sympy, scikit-image, pandas, seaborn.
2015-05-03 19:41 ` Ludovic Courtès
@ 2015-05-15 14:39 ` Ricardo Wurmus
0 siblings, 0 replies; 3+ messages in thread
From: Ricardo Wurmus @ 2015-05-15 14:39 UTC (permalink / raw)
To: Ludovic Courtès; +Cc: Guix-devel
Ludovic Courtès writes:
>> * gnu/packages/python.scm (python-scikit-image, python2-scikit-image): New
>> variables.
>> * gnu/packages/python.scm (python-pandas, python2-pandas): New variables.
>> * gnu/packages/python.scm (python-seaborn, python2-seaborn): New variables.
[...]
> Should these [inputs] be propagated, or does it work somehow when only
> scikit is installed in a profile/build environment and one runs
> ‘import scikit’?
You were right. I had to propagate the inputs to make the import work.
For seaborn "GI_TYPELIB_PATH=~/.guix-profile/lib/girepository-1.0" must
be set as well as it uses matplotlib. I had to read the comments for
python-matplotlib to figure this out. It would be better if we could
use a search-path specification there.
I pushed these three package recipies after changing the inputs and
testing imports.
Thanks!
Ricardo
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-05-15 14:39 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-29 13:24 [PATCH] Add sympy, scikit-image, pandas, seaborn Ricardo Wurmus
2015-05-03 19:41 ` Ludovic Courtès
2015-05-15 14:39 ` Ricardo Wurmus
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).