From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ben Woodcroft Subject: [PATCH 2/2] gnu: Add python-scikit-bio. Date: Sun, 24 Apr 2016 23:01:25 +1000 Message-ID: <1461502885-8719-2-git-send-email-donttrustben@gmail.com> References: <1461244921-7412-1-git-send-email-donttrustben@gmail.com> Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:60409) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1auJfQ-000319-RB for Guix-devel@gnu.org; Sun, 24 Apr 2016 09:01:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1auJfN-0005uB-LK for Guix-devel@gnu.org; Sun, 24 Apr 2016 09:01:40 -0400 Received: from mail-pf0-x243.google.com ([2607:f8b0:400e:c00::243]:36296) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1auJfN-0005u7-BJ for Guix-devel@gnu.org; Sun, 24 Apr 2016 09:01:37 -0400 Received: by mail-pf0-x243.google.com with SMTP id p185so14743556pfb.3 for ; Sun, 24 Apr 2016 06:01:37 -0700 (PDT) Received: from localhost.localdomain ([103.25.181.216]) by smtp.googlemail.com with ESMTPSA id q70sm21015687pfj.81.2016.04.24.06.01.33 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 24 Apr 2016 06:01:34 -0700 (PDT) In-Reply-To: <1461244921-7412-1-git-send-email-donttrustben@gmail.com> 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" To: Guix-devel@gnu.org * 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