On 18/09/15 01:51, Ricardo Wurmus wrote:
Hi Ben,

thank you very much for your patch!
and you sir, for the review.
+    (inputs
+     `(("python-setuptools" ,python2-setuptools)
I think this should be a native input instead.
ok
+       ("python-biopython" ,python2-biopython)))
And this looks like it should be a propagated input instead.  Have you
tried running seqmagick after installing it with this package recipe?  I
found that Python executables often require either propagated inputs or
wrapping in PYTHONPATH to work without runtime errors.
I did, although not well enough to pick up the error you point out. Actually I'm a bit confused as to the difference between the input types even after reading the manual. Is this a fair summary?

native-inputs: required for building but not runtime - installing a package through a substitute won't install these inputs inputs: installed in the store but not in the profile, as well as being present at build time propagated-inputs: installed in the store and in the profile, as well as being present at build time


Anyway, it seems as if the package would have worked because a wrapper is generated with PYTHONPATH including inputs, propagated-inputs and native-inputs. But this seems a bit strange - why would native inputs be in the runtime wrapper?

$ cat /tmp/a.fa
>a
ATGG
$ ./pre-inst-env guix environment --ad-hoc seqmagick --pure -E 'echo $PATH; echo $PYTHONPATH; seqmagick info /tmp/a.fa'
;;; note: source file /home/ben/git/guix/gnu/packages/bioinformatics.scm
;;; newer than compiled /home/ben/git/guix/gnu/packages/bioinformatics.go
/gnu/store/bjd27hqk0wnh28nzmawjymdh3gfk98pn-seqmagick-0.6.1/bin

name      alignment    min_len   max_len   avg_len  num_seqs
/tmp/a.fa FALSE              4         4      4.00         1



$ cat /gnu/store/bjd27hqk0wnh28nzmawjymdh3gfk98pn-seqmagick-0.6.1/bin/.seqmagick-wrap-01
#!/gnu/store/cpx9iibpdwi3wb81glpnnlxr9zra2iiv-bash-4.3.39/bin/bash
export PYTHONPATH="/gnu/store/bjd27hqk0wnh28nzmawjymdh3gfk98pn-seqmagick-0.6.1/lib/python2.7/site-packages:/gnu/store/qlf4k2b81wms6avlyny7hix175asg8kg-python-2.7.10/lib/python2.7/site-packages:/gnu/store/zmhk5r3lmc3s8ivdx9vv6m5vzn6fqim5-python2-setuptools-12.1/lib/python2.7/site-packages:/gnu/store/20s2vvslsapynhmbfsa3q2iyv9dzjzr2-python2-nose-1.3.4/lib/python2.7/site-packages:/gnu/store/c7navsrzibg2rjgs1fzqry711wch5f3p-python2-biopython-1.65/lib/python2.7/site-packages:/gnu/store/bjd27hqk0wnh28nzmawjymdh3gfk98pn-seqmagick-0.6.1/lib/python2.7/site-packages/${PYTHONPATH:+:}$PYTHONPATH" exec -a "$0" "/gnu/store/bjd27hqk0wnh28nzmawjymdh3gfk98pn-seqmagick-0.6.1/bin/.seqmagick-real" "$@"

+    (native-inputs
+     `(("python-nose" ,python2-nose)))
+    (home-page "http://github.com/fhcrc/seqmagick";)
+    (synopsis
+     "Tools for converting and modifying sequence files from the command-line")
The synopsis is a bit long.  You could shave off two words like this:

   “Command-line tools for converting and modifying sequence files”

but that’s not really much better.  I’m open to suggestions.
"Tools for converting and modifying sequence files"
+    (description
+     "Bioinformaticians often have to convert sequence files between formats
+and do little manipulations on them, and it's not worth writing scripts for
+that.  Seqmagick is a utility to expose the file format conversion in
+BioPython in a convenient way.  Instead of having a big mess of scripts, there
+is one that takes arguments.")
+    (license license:gpl3)))
+
I’m not sure if it’s really “GPLv3 only” or “GPLv3 or later” as there
are no license headers anywhere.  Maybe others could comment what’s the
proper declaration here.
From the readme:
>|seqmagick| is free software under the GPL v3.

Is that not straightforward enough?

Thanks,
ben
>From 9328316f5ff7a454e0370bab9ac4897926629b72 Mon Sep 17 00:00:00 2001
From: Ben Woodcroft <donttrust...@gmail.com>
Date: Sat, 19 Sep 2015 19:31:57 +1000
Subject: [PATCH] gnu: Add seqmagick.

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

diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm
index 03eb2df..08b3500 100644
--- a/gnu/packages/bioinformatics.scm
+++ b/gnu/packages/bioinformatics.scm
@@ -2489,6 +2489,45 @@ manipulation, online and indexed string search, efficient I/O of
 bioinformatics file formats, sequence alignment, and more.")
     (license license:bsd-3)))
 
+(define-public seqmagick
+  (package
+    (name "seqmagick")
+    (version "0.6.1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append
+             "https://pypi.python.org/packages/source/s/seqmagick/seqmagick-";
+             version ".tar.gz"))
+       (sha256
+        (base32
+         "0cgn477n74gsl4qdaakrrhi953kcsd4q3ivk2lr18x74s3g4ma1d"))))
+    (build-system python-build-system)
+    (arguments
+     ;; python2 only, see https://github.com/fhcrc/seqmagick/issues/56
+     `(#:python ,python-2
+       #:phases
+       (modify-phases %standard-phases
+         ;; current test in setup.py does not work as of 0.6.1,
+         ;; so use nose to run tests instead for now. See
+         ;; https://github.com/fhcrc/seqmagick/issues/55
+         (replace 'check (lambda _ (zero? (system* "nosetests")))))))
+    (propagated-inputs
+     `(("python-biopython" ,python2-biopython)))
+    (native-inputs
+     `(("python-setuptools" ,python2-setuptools)
+       ("python-nose" ,python2-nose)))
+    (home-page "http://github.com/fhcrc/seqmagick";)
+    (synopsis
+     "Tools for converting and modifying sequence files")
+    (description
+     "Bioinformaticians often have to convert sequence files between formats
+and do little manipulations on them, and it's not worth writing scripts for
+that.  Seqmagick is a utility to expose the file format conversion in
+BioPython in a convenient way.  Instead of having a big mess of scripts, there
+is one that takes arguments.")
+    (license license:gpl3)))
+
 (define-public star
   (package
     (name "star")
-- 
2.4.3

Reply via email to