diff mbox

[2/3] gnu: Add python-pyxb.

Message ID bcc8bfa6-c638-e7ff-a48e-6c7d4f2c1038@uq.edu.au
State New
Headers show

Commit Message

Ben Woodcroft Sept. 26, 2016, 11:15 a.m. UTC
On 24/09/16 13:15, Marius Bakke wrote:
> Ben Woodcroft <b.woodcroft@uq.edu.au> writes:
>
>>> Htslib is propagated because it
>>> is included by the installed samtools and bcftools headers; at least one
>>> of pysams dependencies failed to build when it was a regular input.
>> Ah, I see. Can this be avoided with patchelf?
> I don't think so. The htslib headers need to be propagated for anything
> that uses header files from pysam, since they contain contain code such
> as "include <htslib/foo.h>". Perhaps you can update the comment to make
> it more clear?
>
> Patchelf is probably what made that work when htslib was bundled.
Ah, ok I see, so the problem is that python-plastid requires the .h 
files during build. Given that this is the only package that has an 
issue, and perhaps pysam doesn't intend to provide these .h files as 
part of it's "interface", I think it might be best to simply put htslib 
as an input to python-plastid. That all checks out, here's a patch 
series to do this plus update plastid. OK?

ben

Comments

Marius Bakke Sept. 26, 2016, 6:32 p.m. UTC | #1
Ben Woodcroft <b.woodcroft@uq.edu.au> writes:

> On 24/09/16 13:15, Marius Bakke wrote:
>> Ben Woodcroft <b.woodcroft@uq.edu.au> writes:
>>
>>>> Htslib is propagated because it
>>>> is included by the installed samtools and bcftools headers; at least one
>>>> of pysams dependencies failed to build when it was a regular input.
>>> Ah, I see. Can this be avoided with patchelf?
>> I don't think so. The htslib headers need to be propagated for anything
>> that uses header files from pysam, since they contain contain code such
>> as "include <htslib/foo.h>". Perhaps you can update the comment to make
>> it more clear?
>>
>> Patchelf is probably what made that work when htslib was bundled.
> Ah, ok I see, so the problem is that python-plastid requires the .h 
> files during build. Given that this is the only package that has an 
> issue, and perhaps pysam doesn't intend to provide these .h files as 
> part of it's "interface", I think it might be best to simply put htslib 
> as an input to python-plastid.

I'm not sure, we would have to do this with every package that uses
the pysam cython interface. This particular issue is described in the
manual:

https://www.gnu.org/software/guix/manual/html_node/package-Reference.html

The propagated-inputs section says "For example this is necessary when a
C/C++ library needs headers of another library to compile, or when a
pkg-config file refers to another one via its Requires field.".

So I think it's a pretty common propagation scenario. See e.g. 618089f9
for a less convoluted case (C++ library that propagates zlib headers).

Perhaps a "propagated-build-inputs" functionality would be useful, so
that libraries are only propagated at build time and not to the profile.

If we don't do propagation, at least add a comment to python-plastid
explaining that htslib is there to avoid propagating from pysam, since
the plastid code contains no direct references to htslib.

Your other changes LGTM.

Thanks!
Marius
Ben Woodcroft Sept. 27, 2016, 11:01 a.m. UTC | #2
On 27/09/16 04:32, Marius Bakke wrote:
> Ben Woodcroft <b.woodcroft@uq.edu.au> writes:
>
>> On 24/09/16 13:15, Marius Bakke wrote:
>>> Ben Woodcroft <b.woodcroft@uq.edu.au> writes:
>>>
>>>>> Htslib is propagated because it
>>>>> is included by the installed samtools and bcftools headers; at least one
>>>>> of pysams dependencies failed to build when it was a regular input.
>>>> Ah, I see. Can this be avoided with patchelf?
>>> I don't think so. The htslib headers need to be propagated for anything
>>> that uses header files from pysam, since they contain contain code such
>>> as "include <htslib/foo.h>". Perhaps you can update the comment to make
>>> it more clear?
>>>
>>> Patchelf is probably what made that work when htslib was bundled.
>> Ah, ok I see, so the problem is that python-plastid requires the .h
>> files during build. Given that this is the only package that has an
>> issue, and perhaps pysam doesn't intend to provide these .h files as
>> part of it's "interface", I think it might be best to simply put htslib
>> as an input to python-plastid.
> I'm not sure, we would have to do this with every package that uses
> the pysam cython interface.
Ah, you're right. I overlooked the cython interface.

I pushed the series propagating htslib with pysam, ending in 99caa6f.

Thanks for persevering.
ben
Ludovic Courtès Sept. 30, 2016, 8:12 p.m. UTC | #3
Hello,

Marius Bakke <mbakke@fastmail.com> skribis:

> I'm not sure, we would have to do this with every package that uses
> the pysam cython interface. This particular issue is described in the
> manual:
>
> https://www.gnu.org/software/guix/manual/html_node/package-Reference.html
>
> The propagated-inputs section says "For example this is necessary when a
> C/C++ library needs headers of another library to compile, or when a
> pkg-config file refers to another one via its Requires field.".
>
> So I think it's a pretty common propagation scenario. See e.g. 618089f9
> for a less convoluted case (C++ library that propagates zlib headers).
>
> Perhaps a "propagated-build-inputs" functionality would be useful, so
> that libraries are only propagated at build time and not to the profile.

FWIW, Nixpkgs makes (or made) this distinction, but I could not think of
a situation where it would make sense to propagate in one context and
not the other.

Ludo’.
diff mbox

Patch

From b5ce635ef019f95ee2857060cbab1b2d4994f021 Mon Sep 17 00:00:00 2001
From: Marius Bakke <mbakke@fastmail.com>
Date: Fri, 16 Sep 2016 18:05:15 +0100
Subject: [PATCH 01/10] gnu: python-pysam: Update to 0.9.1.4.

* gnu/packages/bioinformatics.scm (python-pysam, python2-pysam): Update
to 0.9.1.4.
---
 gnu/packages/bioinformatics.scm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm
index 1bf91a9..6e83461 100644
--- a/gnu/packages/bioinformatics.scm
+++ b/gnu/packages/bioinformatics.scm
@@ -1290,13 +1290,13 @@  multiple sequence alignments.")
 (define-public python-pysam
   (package
     (name "python-pysam")
-    (version "0.8.4")
+    (version "0.9.1.4")
     (source (origin
               (method url-fetch)
               (uri (pypi-uri "pysam" version))
               (sha256
                (base32
-                "1slx5mb94mzm5qzk52q270sab0sar95j67w1g1k452nz3s9j7krh"))))
+                "1i1djacqbr88y7w18b4aa78zxnsyr4sz7yqdq2spi7gs0y6pzvjn"))))
     (build-system python-build-system)
     (arguments
      `(#:tests? #f ; tests are excluded in the manifest
-- 
2.9.2


From 2f815c0435eb514f850c6bfa8b0996fd6d3cb538 Mon Sep 17 00:00:00 2001
From: Marius Bakke <mbakke@fastmail.com>
Date: Sat, 17 Sep 2016 10:33:28 +0100
Subject: [PATCH 02/10] gnu: Add python-pyxb.

* gnu/packages/xml.scm (python-pyxb, python2-pyxb): New variables.
---
 gnu/packages/xml.scm | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)

diff --git a/gnu/packages/xml.scm b/gnu/packages/xml.scm
index 7befad5..cd3426b 100644
--- a/gnu/packages/xml.scm
+++ b/gnu/packages/xml.scm
@@ -13,6 +13,7 @@ 
 ;;; Copyright © 2016 Jan Nieuwenhuizen <janneke@gnu.org>
 ;;; Copyright © 2016 ng0 <ng0@we.make.ritual.n0.is>
 ;;; Copyright © 2016 Tobias Geerinckx-Rice <me@tobias.gr>
+;;; Copyright © 2016 Marius Bakke <mbakke@fastmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -729,6 +730,30 @@  different Unicode encodings which happen automatically during
 parsing/saving.")
     (license license:expat)))
 
+(define-public python-pyxb
+  (package
+    (name "python-pyxb")
+    (version "1.2.5")
+    (source (origin
+              (method url-fetch)
+              (uri (pypi-uri "PyXB" version))
+              (sha256
+               (base32
+                "0rzzwibfqa28gxgcxx4cybx1qcg0g6fand06ykj3gz7z5kp653sf"))))
+    (build-system python-build-system)
+    (home-page "http://pyxb.sourceforge.net/")
+    (synopsis "Python XML Schema Bindings")
+    (description
+     "PyXB (\"pixbee\") is a pure Python package that generates Python source
+code for classes that correspond to data structures defined by XMLSchema.")
+    (license (list license:asl2.0    ; Most files.
+                   license:expat     ; pyxb/utils/six.py
+                   license:gpl2      ; bundled jquery in doc is dual MIT/GPL2
+                   license:psfl))))  ; pyxb/utils/activestate.py
+
+(define-public python2-pyxb
+  (package-with-python2 python-pyxb))
+
 (define-public xmlto
   (package
     (name "xmlto")
-- 
2.9.2


From ee973d7f50f7a874a3917c3ea20bcc8e1c17cba3 Mon Sep 17 00:00:00 2001
From: Marius Bakke <mbakke@fastmail.com>
Date: Sat, 17 Sep 2016 10:42:56 +0100
Subject: [PATCH 03/10] gnu: python2-pbcore: Update to 1.2.10.

* gnu/packages/bioinformatics.scm (python2-pbcore): Update to 1.2.10.
[propagated-inputs]: New field. Add python2-pyxb.
---
 gnu/packages/bioinformatics.scm | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm
index 6e83461..a935d5a 100644
--- a/gnu/packages/bioinformatics.scm
+++ b/gnu/packages/bioinformatics.scm
@@ -3376,13 +3376,13 @@  interrupted by stop codons.  OrfM finds and prints these ORFs.")
 (define-public python2-pbcore
   (package
     (name "python2-pbcore")
-    (version "1.2.8")
+    (version "1.2.10")
     (source (origin
               (method url-fetch)
               (uri (pypi-uri "pbcore" version))
               (sha256
                (base32
-                "02pfn5raa3zf739672bg0dkx7z3j2c4nx7vmpfjqy5b12jrqpymk"))))
+                "1kjmv891d6qbpp4shhhvkl02ff4q5xlpnls2513sm2cjcrs52f1i"))))
     (build-system python-build-system)
     (arguments `(#:python ,python-2)) ; pbcore requires Python 2.7
     (inputs
@@ -3395,6 +3395,8 @@  interrupted by stop codons.  OrfM finds and prints these ORFs.")
        ("python-nose" ,python2-nose)
        ("python-setuptools" ,python2-setuptools)
        ("python-sphinx" ,python2-sphinx)))
+    (propagated-inputs
+     `(("python-pyxb" ,python2-pyxb)))
     (home-page "http://pacificbiosciences.github.io/pbcore/")
     (synopsis "Library for reading and writing PacBio data files")
     (description
-- 
2.9.2


From cf8ad52987ea4c7cd3e01d317c71664be59077cb Mon Sep 17 00:00:00 2001
From: Marius Bakke <mbakke@fastmail.com>
Date: Thu, 22 Sep 2016 13:47:53 +0100
Subject: [PATCH 04/10] gnu: Add bcftools.

* gnu/packages/bioinformatics.scm (bcftools): New variable.
---
 gnu/packages/bioinformatics.scm | 58 +++++++++++++++++++++++++++++++++++++++++
 1 file changed, 58 insertions(+)

diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm
index a935d5a..679502e 100644
--- a/gnu/packages/bioinformatics.scm
+++ b/gnu/packages/bioinformatics.scm
@@ -265,6 +265,64 @@  instance, it implements several methods to assess contig-wise read coverage.")
 BAM files.")
     (license license:expat)))
 
+(define-public bcftools
+  (package
+    (name "bcftools")
+    (version "1.3.1")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append
+                    "https://github.com/samtools/bcftools/releases/download/"
+                    version "/bcftools-" version ".tar.bz2"))
+              (sha256
+               (base32
+                "095ry68vmz9q5s1scjsa698dhgyvgw5aicz24c19iwfbai07mhqj"))
+              (modules '((guix build utils)))
+              (snippet
+               ;; Delete bundled htslib.
+               '(delete-file-recursively "htslib-1.3.1"))))
+    (build-system gnu-build-system)
+    (arguments
+     `(#:test-target "test"
+       #:make-flags
+       (list
+        "USE_GPL=1"
+        (string-append "prefix=" (assoc-ref %outputs "out"))
+        (string-append "HTSDIR=" (assoc-ref %build-inputs "htslib") "/include")
+        (string-append "HTSLIB=" (assoc-ref %build-inputs "htslib") "/lib/libhts.a")
+        (string-append "BGZIP=" (assoc-ref %build-inputs "htslib") "/bin/bgzip")
+        (string-append "TABIX=" (assoc-ref %build-inputs "htslib") "/bin/tabix"))
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'patch-Makefile
+           (lambda _
+             (substitute* "Makefile"
+               ;; Do not attempt to build htslib.
+               (("^include \\$\\(HTSDIR\\)/htslib\\.mk") "")
+               ;; Link against GSL cblas.
+               (("-lcblas") "-lgslcblas"))
+             #t))
+         (delete 'configure)
+         (add-before 'check 'patch-tests
+           (lambda _
+             (substitute* "test/test.pl"
+               (("/bin/bash") (which "bash")))
+             #t)))))
+    (native-inputs
+     `(("htslib" ,htslib)
+       ("perl" ,perl)))
+    (inputs
+     `(("gsl" ,gsl)
+       ("zlib" ,zlib)))
+    (home-page "https://samtools.github.io/bcftools/")
+    (synopsis "Utilities for variant calling and manipulating VCFs and BCFs")
+    (description
+     "BCFtools is a set of utilities that manipulate variant calls in the
+Variant Call Format (VCF) and its binary counterpart BCF.  All commands work
+transparently with both VCFs and BCFs, both uncompressed and BGZF-compressed.")
+    ;; The sources are dual MIT/GPL, but becomes GPL-only when USE_GPL=1.
+    (license (list license:gpl3+ license:expat))))
+
 (define-public bedops
   (package
     (name "bedops")
-- 
2.9.2


From c55bb85fd088474c942e79f81d87cefa5a1db82e Mon Sep 17 00:00:00 2001
From: Marius Bakke <mbakke@fastmail.com>
Date: Fri, 23 Sep 2016 06:40:40 +0100
Subject: [PATCH 05/10] gnu: python-pysam: Use 'modify-phases'.

* gnu/packages/bioinformatics.scm (python-pysam)[arguments]: Use
'modify-phases'.
---
 gnu/packages/bioinformatics.scm | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm
index 679502e..518dfea 100644
--- a/gnu/packages/bioinformatics.scm
+++ b/gnu/packages/bioinformatics.scm
@@ -1359,12 +1359,12 @@  multiple sequence alignments.")
     (arguments
      `(#:tests? #f ; tests are excluded in the manifest
        #:phases
-       (alist-cons-before
-        'build 'set-flags
-        (lambda _
-          (setenv "LDFLAGS" "-lncurses")
-          (setenv "CFLAGS" "-D_CURSES_LIB=1"))
-        %standard-phases)))
+       (modify-phases %standard-phases
+         (add-before 'build 'set-flags
+           (lambda _
+             (setenv "LDFLAGS" "-lncurses")
+             (setenv "CFLAGS" "-D_CURSES_LIB=1")
+             #t)))))
     (inputs
      `(("ncurses"           ,ncurses)
        ("zlib"              ,zlib)))
-- 
2.9.2


From 745d7f1ed15b6b4c88a8d67e858fd76269312739 Mon Sep 17 00:00:00 2001
From: Ben J Woodcroft <donttrustben@gmail.com>
Date: Mon, 26 Sep 2016 13:54:42 +1000
Subject: [PATCH 06/10] gnu: python-plastid: Add input 'htslib'.

By default, plastid uses the .h files included with pysam when it is compiled
with the bundled htslib.  Since we will soon use an externally installed
htslib, we use htslib directly as an input to plastid.

* gnu/packages/bioinformatics.scm (python-plastid, python2-htslib)
[inputs]: New field.  Add 'htslib'.
---
 gnu/packages/bioinformatics.scm | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm
index 518dfea..5e152b4 100644
--- a/gnu/packages/bioinformatics.scm
+++ b/gnu/packages/bioinformatics.scm
@@ -1436,6 +1436,8 @@  UCSC genome browser.")
     (native-inputs
      `(("python-cython" ,python-cython)
        ("python-nose" ,python-nose)))
+    (inputs
+     `(("htslib" ,htslib)))
     (home-page "https://github.com/joshuagryphon/plastid")
     (synopsis "Python library for genomic analysis")
     (description
-- 
2.9.2


From 31f4ba8b2e71c8c5f323eff3be5a93e408a86e31 Mon Sep 17 00:00:00 2001
From: Marius Bakke <mbakke@fastmail.com>
Date: Thu, 22 Sep 2016 14:08:05 +0100
Subject: [PATCH 07/10] gnu: python-pysam: Delete bundled htslib.

* gnu/packages/bioinformatics.scm (python-pysam)[source]: Add snippet
to delete htslib.
[arguments]: Add htslib flags in 'set-flags phase.
[inputs]: Add htslib.
---
 gnu/packages/bioinformatics.scm | 16 +++++++++++++---
 1 file changed, 13 insertions(+), 3 deletions(-)

diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm
index 5e152b4..a99549c 100644
--- a/gnu/packages/bioinformatics.scm
+++ b/gnu/packages/bioinformatics.scm
@@ -1354,19 +1354,29 @@  multiple sequence alignments.")
               (uri (pypi-uri "pysam" version))
               (sha256
                (base32
-                "1i1djacqbr88y7w18b4aa78zxnsyr4sz7yqdq2spi7gs0y6pzvjn"))))
+                "1i1djacqbr88y7w18b4aa78zxnsyr4sz7yqdq2spi7gs0y6pzvjn"))
+              (modules '((guix build utils)))
+              (snippet
+               ;; Drop bundled htslib. TODO: Also remove samtools and bcftools.
+               '(delete-file-recursively "htslib"))))
     (build-system python-build-system)
     (arguments
      `(#:tests? #f ; tests are excluded in the manifest
        #:phases
        (modify-phases %standard-phases
          (add-before 'build 'set-flags
-           (lambda _
+           (lambda* (#:key inputs #:allow-other-keys)
+             (setenv "HTSLIB_MODE" "external")
+             (setenv "HTSLIB_LIBRARY_DIR"
+                     (string-append (assoc-ref inputs "htslib") "/lib"))
+             (setenv "HTSLIB_INCLUDE_DIR"
+                     (string-append (assoc-ref inputs "htslib") "/include"))
              (setenv "LDFLAGS" "-lncurses")
              (setenv "CFLAGS" "-D_CURSES_LIB=1")
              #t)))))
     (inputs
-     `(("ncurses"           ,ncurses)
+     `(("htslib"            ,htslib)
+       ("ncurses"           ,ncurses)
        ("zlib"              ,zlib)))
     (native-inputs
      `(("python-cython"     ,python-cython)
-- 
2.9.2


From 176c1b2992548aa3339a4d5d7fcda5cc20807c68 Mon Sep 17 00:00:00 2001
From: Marius Bakke <mbakke@fastmail.com>
Date: Thu, 22 Sep 2016 14:11:59 +0100
Subject: [PATCH 08/10] gnu: python-pysam: Enable tests.

* gnu/packages/bioinformatics.scm (python-pysam)[source]: Change from
PyPi to source archive due to missing test data.
[arguments]: Add check phase after install.
[native-inputs]: Add python-nose, samtools and bcftools.
---
 gnu/packages/bioinformatics.scm | 36 ++++++++++++++++++++++++++++++------
 1 file changed, 30 insertions(+), 6 deletions(-)

diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm
index a99549c..d4c8320 100644
--- a/gnu/packages/bioinformatics.scm
+++ b/gnu/packages/bioinformatics.scm
@@ -1351,18 +1351,21 @@  multiple sequence alignments.")
     (version "0.9.1.4")
     (source (origin
               (method url-fetch)
-              (uri (pypi-uri "pysam" version))
+              ;; Test data is missing on PyPi.
+              (uri (string-append
+                    "https://github.com/pysam-developers/pysam/archive/v"
+                    version ".tar.gz"))
+              (file-name (string-append name "-" version ".tar.gz"))
               (sha256
                (base32
-                "1i1djacqbr88y7w18b4aa78zxnsyr4sz7yqdq2spi7gs0y6pzvjn"))
+                "0y41ssbg6nvn2jgcbnrvkzblpjcwszaiv1rgyd8dwzjkrbfsgsmc"))
               (modules '((guix build utils)))
               (snippet
                ;; Drop bundled htslib. TODO: Also remove samtools and bcftools.
                '(delete-file-recursively "htslib"))))
     (build-system python-build-system)
     (arguments
-     `(#:tests? #f ; tests are excluded in the manifest
-       #:phases
+     `(#:phases
        (modify-phases %standard-phases
          (add-before 'build 'set-flags
            (lambda* (#:key inputs #:allow-other-keys)
@@ -1373,14 +1376,35 @@  multiple sequence alignments.")
                      (string-append (assoc-ref inputs "htslib") "/include"))
              (setenv "LDFLAGS" "-lncurses")
              (setenv "CFLAGS" "-D_CURSES_LIB=1")
-             #t)))))
+             #t))
+         (delete 'check)
+         (add-after 'install 'check
+           (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"))
+             ;; Step out of source dir so python does not import from CWD.
+             (chdir "tests")
+             (setenv "HOME" "/tmp")
+             (and (zero? (system* "make" "-C" "pysam_data"))
+                  (zero? (system* "make" "-C" "cbcf_data"))
+                  (zero? (system* "nosetests" "-v"))))))))
     (inputs
      `(("htslib"            ,htslib)
        ("ncurses"           ,ncurses)
        ("zlib"              ,zlib)))
     (native-inputs
      `(("python-cython"     ,python-cython)
-       ("python-setuptools" ,python-setuptools)))
+       ("python-setuptools" ,python-setuptools)
+       ;; Dependencies below are are for tests only.
+       ("samtools"          ,samtools)
+       ("bcftools"          ,bcftools)
+       ("python-nose"       ,python-nose)))
     (home-page "https://github.com/pysam-developers/pysam")
     (synopsis "Python bindings to the SAMtools C API")
     (description
-- 
2.9.2


From 174b5b77deecdbadb67db3a3634e6d239edc8d30 Mon Sep 17 00:00:00 2001
From: Ben J Woodcroft <donttrustben@gmail.com>
Date: Mon, 26 Sep 2016 15:26:17 +1000
Subject: [PATCH 09/10] gnu: Add python-termcolor.

* gnu/packages/python.scm (python-termcolor, python2-termcolor): New
variables.
---
 gnu/packages/python.scm | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index 688a5d4..529b7fd 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -6295,6 +6295,30 @@  a hash value.")
     (name "python2-tlsh")
     (inputs `(("python" ,python-2)))))
 
+(define-public python-termcolor
+  (package
+    (name "python-termcolor")
+    (version "1.1.0")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "python-termcolor" version))
+       (sha256
+        (base32
+         "0fv1vq14rpqwgazxg4981904lfyp84mnammw7y046491cv76jv8x"))))
+    (build-system python-build-system)
+    (arguments
+     ;; There are no tests.
+     `(#:tests? #f))
+    (home-page "http://pypi.python.org/pypi/termcolor")
+    (synopsis "ANSII Color formatting for terminal output")
+    (description
+     "This package provides ANSII Color formatting for output in terminals.")
+    (license license:expat)))
+
+(define-public python2-termcolor
+  (package-with-python2 python-termcolor))
+
 (define-public python-libarchive-c
   (package
     (name "python-libarchive-c")
-- 
2.9.2


From fa46350324fcfe203a70e947a2abd8c2488b6867 Mon Sep 17 00:00:00 2001
From: Ben J Woodcroft <donttrustben@gmail.com>
Date: Mon, 26 Sep 2016 14:19:29 +1000
Subject: [PATCH 10/10] gnu: python-plastid: Update to 1.4.6.

* gnu/packages/bioinformatics.scm (python-plastid, python2-plastid): Update to
1.4.6.
[propagated-inputs]: Add python-termcolor.
---
 gnu/packages/bioinformatics.scm | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm
index d4c8320..c2dc9a3 100644
--- a/gnu/packages/bioinformatics.scm
+++ b/gnu/packages/bioinformatics.scm
@@ -1447,13 +1447,13 @@  UCSC genome browser.")
 (define-public python-plastid
   (package
     (name "python-plastid")
-    (version "0.4.5")
+    (version "0.4.6")
     (source (origin
               (method url-fetch)
               (uri (pypi-uri "plastid" version))
               (sha256
                (base32
-                "1nhxw8a5gn9as58i2ih52c5cjwj48ik418pzsjwph3s66mmy9yvq"))))
+                "1sqkz5d3b9kf688mp7k771c87ins42j7j0whmkb49cb3fsg8s8lj"))))
     (properties `((python2-variant . ,(delay python2-plastid))))
     (build-system python-build-system)
     (arguments
@@ -1466,7 +1466,8 @@  UCSC genome browser.")
        ("python-pysam" ,python-pysam)
        ("python-matplotlib" ,python-matplotlib)
        ("python-biopython" ,python-biopython)
-       ("python-twobitreader" ,python-twobitreader)))
+       ("python-twobitreader" ,python-twobitreader)
+       ("python-termcolor" ,python-termcolor)))
     (native-inputs
      `(("python-cython" ,python-cython)
        ("python-nose" ,python-nose)))
-- 
2.9.2