From: Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de>
To: Guix-devel <guix-devel@gnu.org>
Subject: [PATCH] gnu: Add Scikit-learn.
Date: Mon, 23 Feb 2015 17:24:06 +0100 [thread overview]
Message-ID: <idj61asiok9.fsf@bimsb-sys02.mdc-berlin.net> (raw)
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: 0001-gnu-Add-Scikit-learn.patch --]
[-- Type: text/x-patch, Size: 3325 bytes --]
From d14dbf6e006b29b93152134c724265cb0b65e41f Mon Sep 17 00:00:00 2001
From: Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de>
Date: Mon, 23 Feb 2015 17:22:29 +0100
Subject: [PATCH] gnu: Add Scikit-learn.
* gnu/packages/python.scm (python-scikit-learn, python2-scikit-learn): New
variables.
---
gnu/packages/python.scm | 65 +++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 65 insertions(+)
diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index e19d707..88e99d7 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -1960,6 +1960,71 @@ sources.")
(define-public python2-sphinx-rtd-theme
(package-with-python2 python-sphinx-rtd-theme))
+(define-public python-scikit-learn
+ (package
+ (name "python-scikit-learn")
+ (version "0.15.2")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (string-append
+ "https://github.com/scikit-learn/scikit-learn/archive/"
+ version ".tar.gz"))
+ (sha256
+ (base32
+ "1rb93h2q15f219sz60sczjb65rg70xjmnp0q4pkkaairx5s05q55"))))
+ (build-system python-build-system)
+ (arguments
+ `(#:phases
+ (alist-cons-before
+ 'build 'set-environment-variables
+ (lambda* (#:key inputs #:allow-other-keys)
+ (let* ((atlas-threaded
+ (string-append (assoc-ref inputs "atlas")
+ "/lib/libtatlas.so"))
+ ;; On single core CPUs only the serial library is created.
+ (atlas-lib
+ (if (file-exists? atlas-threaded)
+ atlas-threaded
+ (string-append (assoc-ref inputs "atlas")
+ "/lib/libsatlas.so"))))
+ (setenv "ATLAS" atlas-lib)))
+ (alist-cons-before
+ 'check 'set-HOME
+ ;; some tests require access to "$HOME"
+ (lambda _ (setenv "HOME" "/tmp"))
+ ;; Tests can only be run after the library has been installed and not
+ ;; within the source directory.
+ (alist-cons-after
+ 'install 'check
+ (lambda _
+ (with-directory-excursion "/tmp"
+ ;; With Python 3 one test of 3334 fails
+ ;; (sklearn.tests.test_common.test_transformers); see
+ ;; https://github.com/scikit-learn/scikit-learn/issues/3693
+ (system* "nosetests" "-v" "sklearn")))
+ (alist-delete 'check %standard-phases))))))
+ (inputs
+ `(("atlas" ,atlas)
+ ("python-numpy" ,python-numpy)
+ ("python-scipy" ,python-scipy)
+ ("python-nose" ,python-nose)))
+ (home-page "http://scikit-learn.org/")
+ (synopsis "Machine Learning in Python")
+ (description
+ "Scikit-learn provides simple and efficient tools for data
+mining and data analysis.")
+ (license bsd-3)))
+
+(define-public python2-scikit-learn
+ (let ((scikit (package-with-python2 python-scikit-learn)))
+ (package (inherit python-scikit-learn)
+ (name "python2-scikit-learn")
+ (propagated-inputs
+ `(("python2-py2cairo" ,python2-py2cairo)
+ ,@(alist-delete "python-pycairo"
+ (package-propagated-inputs scikit)))))))
+
(define-public python-cython
(package
(name "python-cython")
--
2.1.0
next reply other threads:[~2015-02-23 16:24 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-02-23 16:24 Ricardo Wurmus [this message]
2015-02-23 17:17 ` [PATCH] gnu: Add Scikit-learn Ricardo Wurmus
2015-02-23 17:36 ` Andreas Enge
2015-02-26 11:28 ` Ricardo Wurmus
2015-02-26 20:44 ` Andreas Enge
2015-02-23 17:52 ` Andreas Enge
2015-02-25 22:52 ` Andreas Enge
2015-02-25 22:57 ` Andreas Enge
2015-02-26 17:11 ` Ludovic Courtès
2015-02-26 17:59 ` Andreas Enge
2015-02-26 18:20 ` Ludovic Courtès
2015-02-26 18:23 ` Andreas Enge
2015-02-26 20:03 ` Eric Bavier
2015-02-26 20:43 ` Andreas Enge
2015-02-26 21:10 ` Eric Bavier
2015-02-27 9:41 ` Andreas Enge
2015-02-27 22:48 ` Andreas Enge
2015-02-27 23:53 ` Andreas Enge
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=idj61asiok9.fsf@bimsb-sys02.mdc-berlin.net \
--to=ricardo.wurmus@mdc-berlin.de \
--cc=guix-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.