From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ben Woodcroft Subject: Re: [PATCH] Add python2-seqmagick. Date: Sat, 19 Sep 2015 19:36:17 +1000 Message-ID: <55FD2C91.9080203@uq.edu.au> References: <55FAA83C.3040403@uq.edu.au> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------050000070506000808080803" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:51446) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZdEZK-0007YT-M5 for guix-devel@gnu.org; Sat, 19 Sep 2015 05:36:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZdEZH-0003WV-DQ for guix-devel@gnu.org; Sat, 19 Sep 2015 05:36:30 -0400 Received: from mailhub2.soe.uq.edu.au ([130.102.132.209]:55598 helo=newmailhub.uq.edu.au) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZdEZG-0003VB-Pr for guix-devel@gnu.org; Sat, 19 Sep 2015 05:36:27 -0400 In-Reply-To: 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-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: Ricardo Wurmus Cc: "guix-devel@gnu.org" This is a multi-part message in MIME format. --------------050000070506000808080803 Content-Type: multipart/alternative; boundary="------------020807070301010304080908" --------------020807070301010304080908 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable X-MIME-Autoconverted: from 8bit to quoted-printable by newmailhub.uq.edu.au id t8J9aJKu016281 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.=20 Actually I'm a bit confused as to the difference between the input types=20 even after reading the manual. Is this a fair summary? native-inputs: required for building but not runtime - installing a=20 package through a substitute won't install these inputs inputs: installed in the store but not in the profile, as well as being=20 present at build time propagated-inputs: installed in the store and in the profile, as well as=20 being present at build time Anyway, it seems as if the package would have worked because a wrapper=20 is generated with PYTHONPATH including inputs, propagated-inputs and=20 native-inputs. But this seems a bit strange - why would native inputs be=20 in the runtime wrapper? $ cat /tmp/a.fa >a ATGG $ ./pre-inst-env guix environment --ad-hoc seqmagick --pure -E 'echo=20 $PATH; echo $PYTHONPATH; seqmagick info /tmp/a.fa' ;;; note: source file /home/ben/git/guix/gnu/packages/bioinformatics.scm ;;; newer than compiled=20 /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=20 /gnu/store/bjd27hqk0wnh28nzmawjymdh3gfk98pn-seqmagick-0.6.1/bin/.seqmagic= k-wrap-01=20 #!/gnu/store/cpx9iibpdwi3wb81glpnnlxr9zra2iiv-bash-4.3.39/bin/bash export=20 PYTHONPATH=3D"/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/zmhk5r3lmc3s8ivdx9vv= 6m5vzn6fqim5-python2-setuptools-12.1/lib/python2.7/site-packages:/gnu/sto= re/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/bjd27hqk0wnh28nzmawjymdh3gfk98= pn-seqmagick-0.6.1/lib/python2.7/site-packages/${PYTHONPATH:+:}$PYTHONPAT= H" exec -a "$0"=20 "/gnu/store/bjd27hqk0wnh28nzmawjymdh3gfk98pn-seqmagick-0.6.1/bin/.seqmagi= ck-real"=20 "$@" >> + (native-inputs >> + `(("python-nose" ,python2-nose))) >> + (home-page "http://github.com/fhcrc/seqmagick") >> + (synopsis >> + "Tools for converting and modifying sequence files from the comm= and-line") > The synopsis is a bit long. You could shave off two words like this: > > =E2=80=9CCommand-line tools for converting and modifying sequence fi= les=E2=80=9D > > but that=E2=80=99s not really much better. I=E2=80=99m open to suggest= ions. "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 scrip= ts 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 scrip= ts, there >> +is one that takes arguments.") >> + (license license:gpl3))) >> + > I=E2=80=99m not sure if it=E2=80=99s really =E2=80=9CGPLv3 only=E2=80=9D= or =E2=80=9CGPLv3 or later=E2=80=9D as there > are no license headers anywhere. Maybe others could comment what=E2=80= =99s the > proper declaration here. From the readme: >|seqmagick| is free software under the GPL v3. Is that not straightforward enough? Thanks, ben --------------020807070301010304080908 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-MIME-Autoconverted: from 8bit to quoted-printable by newmailhub.uq.edu.au id t8J9aJKu016281

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
;;;=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 newer than compiled /home/ben/git/guix/gnu/packages/bioinformatics.go
/gnu/store/bjd27hqk0wnh28nzmawjymdh3gfk98pn-seqmagick-0.6.1/bin

name=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 alignment=C2=A0=C2=A0=C2=A0 min_= len=C2=A0=C2=A0 max_len=C2=A0=C2=A0 avg_len=C2=A0 num_seqs
/tmp/a.fa FALSE=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0 4=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= 4=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 4.00=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0 1



$ cat /gnu/store/bjd27hqk0wnh28nzmawjymdh3gfk98pn-seqmagick-0.6.1/bin/.= seqmagick-wrap-01
#!/gnu/store/cpx9iibpdwi3wb81glpnnlxr9zra2iiv-bash-4.3.39/= bin/bash
export PYTHONPATH=3D"/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/zmhk5r3lmc3s8ivdx9vv= 6m5vzn6fqim5-python2-setuptools-12.1/lib/python2.7/site-packages:/gnu/sto= re/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/bjd27hqk0wnh28nzmawjymdh3gfk98= pn-seqmagick-0.6.1/lib/python2.7/site-packages/${PYTHONPATH:+:}$PYTHONPAT= H"
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:

  =E2=80=9CCommand-line tools for converting and modifying sequence files=
=E2=80=9D

but that=E2=80=99s not really much better.  I=E2=80=99m open to suggestio=
ns.
"Tools for converting and modifying sequence files"
+    (description
+     "Bioinformaticians often have to convert sequence files between for=
mats
+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=E2=80=99m not sure if it=E2=80=99s really =E2=80=9CGPLv3 only=E2=80=9D =
or =E2=80=9CGPLv3 or later=E2=80=9D as there
are no license headers anywhere.  Maybe others could comment what=E2=80=99=
s the
proper declaration here.
From the readme:
>seqmagick is free software under the GPL v3.

Is that not straightforward enough?

Thanks,
ben
--------------020807070301010304080908-- --------------050000070506000808080803 Content-Type: text/x-patch; name="0001-gnu-Add-seqmagick.patch" Content-Disposition: attachment; filename="0001-gnu-Add-seqmagick.patch" Content-Transfer-Encoding: 7bit >From 9328316f5ff7a454e0370bab9ac4897926629b72 Mon Sep 17 00:00:00 2001 From: Ben Woodcroft 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 --------------050000070506000808080803--