Patchwork gnu: Add coda.

login
register
mail settings
Submitter Thomas Danckaert
Date Oct. 21, 2016, 7:26 a.m.
Message ID <20161021.092611.1551121596719954976.post@thomasdanckaert.be>
Download mbox | patch
Permalink /patch/16719/
State New
Headers show

Comments

Thomas Danckaert - Oct. 21, 2016, 7:26 a.m.
From: ludo@gnu.org (Ludovic Courtès)

Subject: Re: [PATCH] gnu: Add coda.
Date: Wed, 19 Oct 2016 22:13:42 +0200

>> +    (native-search-paths

>> +     (list (search-path-specification

>> +            (variable "PYTHONPATH")

>> +            (files '("lib/python3.4/site-packages")))))

>

> Unless I’m mistaken this is not needed: this ‘native-search-paths’ 

> entry

> belongs in Python itself, not in users of Python.


I used ipython to test the interface, and noticed the PYTHONPATH 
setting was missing.  That's why I added it here.  So probably this 
native-search-paths entry could/should be added to the ipython 
package?

>> +    (synopsis "Common interface to various earth observation data 

>> formats")

>> +    (description

>> +     "The Common Data Access toolbox (CODA) provides a set of 

>> interfaces for

>> +reading remote sensing data from earth observation data files.  

>> These

>> +interfaces consist of command line applications, libraries, 

>> interfaces to

>> +scientific applications (such as IDL and MATLAB), and interfaces 

>> to

>

> Let’s remove MATLAB; we can replace it with Octave if it’s valid.


I removed IDL as well, because it's the same story as Matlab 
(proprietary scripting language for scientific applications).  I 
don't think there's an Octave interface, unless Octave can 
automatically use interfaces written for Matlab (unlikely? I have no 
experience with either).

>> +    (license license:gpl2)))

>

> Version 2 only?  That is, is the “or any later version” wording 

> missing

> from license headers?


gpl2+, indeed.

I've attached an updated patch.

cheers,

Thomas
Ludovic Courtès - Oct. 24, 2016, 9:24 p.m.
Thomas Danckaert <post@thomasdanckaert.be> skribis:

> From: ludo@gnu.org (Ludovic Courtès)
> Subject: Re: [PATCH] gnu: Add coda.
> Date: Wed, 19 Oct 2016 22:13:42 +0200
>
>>> +    (native-search-paths
>>> +     (list (search-path-specification
>>> +            (variable "PYTHONPATH")
>>> +            (files '("lib/python3.4/site-packages")))))
>>
>> Unless I’m mistaken this is not needed: this ‘native-search-paths’
>> entry
>> belongs in Python itself, not in users of Python.
>
> I used ipython to test the interface, and noticed the PYTHONPATH
> setting was missing.  That's why I added it here.  So probably this
> native-search-paths entry could/should be added to the ipython
> package?

Probably not.  I think the problem is as described in
<http://bugs.gnu.org/22138>.

>>> +    (synopsis "Common interface to various earth observation data
>>> formats")
>>> +    (description
>>> +     "The Common Data Access toolbox (CODA) provides a set of
>>> interfaces for
>>> +reading remote sensing data from earth observation data files.
>>> These
>>> +interfaces consist of command line applications, libraries,
>>> interfaces to
>>> +scientific applications (such as IDL and MATLAB), and interfaces
>>> to
>>
>> Let’s remove MATLAB; we can replace it with Octave if it’s valid.
>
> I removed IDL as well, because it's the same story as Matlab
> (proprietary scripting language for scientific applications).  I don't
> think there's an Octave interface, unless Octave can automatically use
> interfaces written for Matlab (unlikely? I have no experience with
> either).

OK.  ISTR Octave can work with “MEX files”, but I’m no expert.

> From f521132ac56e3ad6f7e6169fa1a0fcd56beb77f6 Mon Sep 17 00:00:00 2001
> From: Thomas Danckaert <thomas.danckaert@gmail.com>
> Date: Wed, 19 Oct 2016 11:44:33 +0200
> Subject: [PATCH] gnu: Add coda.
>
> * gnu/packages/maths.scm (coda): New variable.

Applied, thanks!

However I noticed that Coda bundles copies of zlib, pcre, and expat.

Could you send a patch that (1) adds those as inputs and makes sure the
bundled copies are not used (using ‘guix gc --references’ on the
result), and (2) removes the corresponding directories from the source
tree in a ‘snippet’, if possible?

Ludo’.

Patch

From f521132ac56e3ad6f7e6169fa1a0fcd56beb77f6 Mon Sep 17 00:00:00 2001
From: Thomas Danckaert <thomas.danckaert@gmail.com>
Date: Wed, 19 Oct 2016 11:44:33 +0200
Subject: [PATCH] gnu: Add coda.

* gnu/packages/maths.scm (coda): New variable.
---
 gnu/packages/maths.scm | 31 +++++++++++++++++++++++++++++++
 1 file changed, 31 insertions(+)

diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 07934e3..c3c5b68 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -113,6 +113,37 @@  interactive dialogs to guide them.")
    (license license:gpl3+)
    (home-page "http://www.gnu.org/software/c-graph/")))
 
+(define-public coda
+  (package
+    (name "coda")
+    (version "2.17.3")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (string-append "https://github.com/stcorp/coda/releases/download/"
+                           version "/coda-" version ".tar.gz"))
+       (sha256
+        (base32 "04b9l3wzcix0mnfq77mwnil6cbr8h2mki8myvy0lzn236qcwaq1h"))))
+    (native-inputs
+     `(("fortran" ,gfortran)
+       ("python" ,python)
+       ("python-numpy" ,python-numpy)))
+    (inputs
+     `(("zlib" ,zlib)
+       ("hdf4" ,hdf4-alt)
+       ("hdf5" ,hdf5)))
+    (build-system gnu-build-system)
+    (arguments
+     '(#:configure-flags '("--with-hdf4" "--with-hdf5" "--enable-python")))
+    (synopsis "A common interface to various earth observation data formats")
+    (description
+     "The Common Data Access toolbox (CODA) provides a set of interfaces for
+reading remote sensing data from earth observation data files.  It consists of
+command line applications and interfaces to the C, Fortran, Python, and Java
+programming languages.")
+    (home-page "https://stcorp.nl/coda")
+    (license license:gpl2+)))
+
 (define-public units
   (package
    (name "units")
-- 
2.7.4