unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Ben Woodcroft <donttrustben@gmail.com>
To: Guix-devel@gnu.org
Subject: [PATCH 2/2] gnu: Add python-scikit-bio.
Date: Sun, 24 Apr 2016 23:01:25 +1000	[thread overview]
Message-ID: <1461502885-8719-2-git-send-email-donttrustben@gmail.com> (raw)
In-Reply-To: <1461244921-7412-1-git-send-email-donttrustben@gmail.com>

* gnu/packages/python.scm (python-scikit-bio, python2-scikit-bio):
New variables.
---
 gnu/packages/bioinformatics.scm | 84 +++++++++++++++++++++++++++++++++++++++++
 1 file changed, 84 insertions(+)

diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm
index 899ce1c..fa67f3b 100644
--- a/gnu/packages/bioinformatics.scm
+++ b/gnu/packages/bioinformatics.scm
@@ -3339,6 +3339,90 @@ optimize the sequencing depth, or to screen multiple libraries to avoid low
 complexity samples.")
     (license license:gpl3+)))
 
+(define-public python-scikit-bio
+  (package
+    (name "python-scikit-bio")
+    (version "0.4.2")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "scikit-bio" version))
+       (sha256
+        (base32
+         "06nrcgfz6c3jb2dnaf1wnvx3dyww94p454c4126gvcvfgv6scczy"))))
+    (build-system python-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         ;; Install procedure installs extraneous binaries.
+         (add-after 'install 'remove-extraneous-files
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out"))
+                    (bin (string-append out "/bin")))
+               (delete-file-recursively bin))
+             #t))
+         ;; Tests are intended to be run using 'make test' not 'setup.py
+         ;; test', but there are many test failures anyway
+         ;; e.g. https://github.com/biocore/scikit-bio/issues/1308.  Run a
+         ;; simple import test instead.
+         (delete 'check)
+         (add-after 'install 'check-after-install
+           (lambda* (#:key inputs outputs #:allow-other-keys)
+             (setenv "PYTHONPATH"
+                     (string-append
+                      (getenv "PYTHONPATH")
+                      ":" (assoc-ref outputs "out")
+                      "/lib/python"
+                      (string-take (string-take-right
+                                    (assoc-ref inputs "python") 5) 3)
+                      "/site-packages"))
+             (zero?
+              (with-directory-excursion "ci"
+                (system*
+                 "python"
+                 "-c"
+                 (string-append "import matplotlib; "
+                                "matplotlib.use(\"Agg\"); "
+                                "import skbio")))))))))
+    (native-inputs
+     `(("python-nose" ,python-nose)
+       ("python-pep8" ,python-pep8)
+       ("python-flake8" ,python-flake8)
+       ("python-dateutil" ,python-dateutil-2)))
+    (propagated-inputs
+     `(("python-bz2file" ,python-bz2file)
+       ("python-lockfile" ,python-lockfile)
+       ("python-cachecontrol" ,python-cachecontrol)
+       ("python-contextlib2" ,python-contextlib2)
+       ("python-decorator" ,python-decorator)
+       ("python-future" ,python-future)
+       ("python-ipython" ,python-ipython)
+       ("python-matplotlib" ,python-matplotlib)
+       ("python-natsort" ,python-natsort)
+       ("python-numpy" ,python-numpy)
+       ("python-pandas" ,python-pandas)
+       ("python-scipy" ,python-scipy)
+       ("python-six" ,python-six)))
+    (home-page "http://scikit-bio.org")
+    (synopsis "Resources for bioinformatics")
+    (description
+     "Scikit-bio is a library for working with biological data in Python,
+providing data structures, algorithms and educational resources.  It defines
+Python packages for biological sequences, alignments, tree, visualisation,
+diversity calculation and file I/O.")
+    (license license:bsd-3)
+    (properties `((python2-variant . ,(delay python2-scikit-bio))))))
+
+(define-public python2-scikit-bio
+  (let ((base (package-with-python2
+               (strip-python2-variant python-scikit-bio))))
+    (package
+      (inherit base)
+      (native-inputs
+       (append (package-native-inputs base)
+               `(("python2-setuptools" ,python2-setuptools)
+                 ("python2-mock" ,python2-mock)))))))
+
 (define-public sra-tools
   (package
     (name "sra-tools")
-- 
2.5.0

  parent reply	other threads:[~2016-04-24 13:01 UTC|newest]

Thread overview: 53+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-21 13:21 [PATCH] Add python-scikit-bio Ben Woodcroft
2016-04-21 13:21 ` [PATCH 01/10] gnu: Add python2-pytest-cache Ben Woodcroft
2016-04-21 13:21 ` [PATCH 02/10] gnu: Add python-bz2file Ben Woodcroft
2016-04-21 15:43   ` Efraim Flashner
2016-04-21 18:24   ` Hartmut Goebel
2016-04-24 13:17     ` Ben Woodcroft
2016-04-21 13:21 ` [PATCH 03/10] gnu: Add python-pytest-pep8 Ben Woodcroft
2016-04-21 18:26   ` Hartmut Goebel
2016-04-24 13:21     ` Ben Woodcroft
2016-04-21 13:21 ` [PATCH 04/10] gnu: Add python-pytest-flakes Ben Woodcroft
2016-04-21 18:26   ` Hartmut Goebel
2016-04-21 13:21 ` [PATCH 05/10] gnu: Add python-future Ben Woodcroft
2016-04-21 13:21 ` [PATCH 06/10] gnu: Add python-cachecontrol Ben Woodcroft
2016-04-21 13:21 ` [PATCH 07/10] gnu: python-tornado: Use 'python2-variant' Ben Woodcroft
2016-04-21 13:21 ` [PATCH 08/10] gnu: python-ipython: " Ben Woodcroft
2016-04-21 15:14   ` Ricardo Wurmus
2016-04-24 13:11     ` Ben Woodcroft
2016-04-24 13:12     ` Ben Woodcroft
2016-04-21 13:22 ` [PATCH 09/10] gnu: Add python-natsort Ben Woodcroft
2016-04-21 15:09   ` Ricardo Wurmus
2016-04-21 13:22 ` [PATCH 10/10] gnu: Add python-scikit-bio Ben Woodcroft
2016-04-21 15:04   ` Ricardo Wurmus
2016-04-21 15:07   ` Ricardo Wurmus
2016-04-21 15:09   ` Ricardo Wurmus
2016-04-24 13:01 ` Ben Woodcroft [this message]
2016-04-24 13:06 ` [PATCH v2] " Ben Woodcroft
2016-04-24 13:06   ` [PATCH v2 01/10] gnu: Add python2-pytest-cache Ben Woodcroft
2016-04-25 18:22     ` Leo Famulari
2016-04-24 13:06   ` [PATCH v2 02/10] gnu: Add python-bz2file Ben Woodcroft
2016-04-25 18:27     ` Leo Famulari
2016-04-24 13:06   ` [PATCH v2 03/10] gnu: Add python-pytest-pep8 Ben Woodcroft
2016-04-24 17:04     ` Efraim Flashner
2016-04-24 23:42       ` Ben Woodcroft
2016-04-24 23:45       ` Ben Woodcroft
2016-04-25  8:43         ` Ricardo Wurmus
2016-04-25 12:36           ` Ben Woodcroft
2016-04-25 18:19             ` Leo Famulari
2016-04-25 20:07               ` proper Python inputs (was: gnu: Add python-pytest-pep8.) Hartmut Goebel
2016-04-26 14:19                 ` Ricardo Wurmus
2016-04-24 13:06   ` [PATCH v2 04/10] gnu: Add python-pytest-flakes Ben Woodcroft
2016-04-25 18:34     ` Leo Famulari
2016-04-24 13:06   ` [PATCH v2 05/10] gnu: Add python-future Ben Woodcroft
2016-04-25 18:30     ` Leo Famulari
2016-04-24 13:06   ` [PATCH v2 06/10] gnu: Add python-cachecontrol Ben Woodcroft
2016-04-25 18:35     ` Leo Famulari
2016-04-24 13:06   ` [PATCH v2 07/10] gnu: python-tornado: Use 'python2-variant' Ben Woodcroft
2016-04-25 18:36     ` Leo Famulari
2016-04-24 13:06   ` [PATCH v2 08/10] gnu: python-ipython: " Ben Woodcroft
2016-04-25 18:48     ` Leo Famulari
2016-04-24 13:06   ` [PATCH v2 09/10] gnu: Add python-natsort Ben Woodcroft
2016-04-25 18:41     ` Leo Famulari
2016-04-24 13:06   ` [PATCH v2 10/10] gnu: Add python-scikit-bio Ben Woodcroft
2016-04-25 18:47     ` Leo Famulari

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

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1461502885-8719-2-git-send-email-donttrustben@gmail.com \
    --to=donttrustben@gmail.com \
    --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 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).