unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [PATCH] gnu: Add python-netcdf4.
@ 2016-12-23 15:42 Thomas Danckaert
  2016-12-24 13:59 ` Marius Bakke
  0 siblings, 1 reply; 4+ messages in thread
From: Thomas Danckaert @ 2016-12-23 15:42 UTC (permalink / raw)
  To: guix-devel

[-- Attachment #1: 0001-gnu-Add-python-netcdf4.patch --]
[-- Type: Text/X-Patch, Size: 2667 bytes --]

From b4b54b695e286c19332600c38d5e07fabee409f8 Mon Sep 17 00:00:00 2001
From: Thomas Danckaert <thomas.danckaert@gmail.com>
Date: Fri, 23 Dec 2016 15:06:43 +0100
Subject: [PATCH] gnu: Add python-netcdf4.

* gnu/packages/python.scm (python-netcdf4): New variable.
---
 gnu/packages/python.scm | 50 +++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 50 insertions(+)

diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
index cc53f76..37ad3df 100644
--- a/gnu/packages/python.scm
+++ b/gnu/packages/python.scm
@@ -800,6 +800,56 @@ concepts.")
 (define-public python2-h5py
   (package-with-python2 python-h5py))
 
+(define-public python-netcdf4
+  (package
+    (name "python-netcdf4")
+    (version "1.2.6")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "netCDF4" version))
+       (sha256
+        (base32
+         "1qcymsfxsdfr4sx0vl7ih5d14z66k6c9sjy4gb6rjaksk5387zvg"))))
+    (build-system python-build-system)
+    (native-inputs
+     `(("python-cython" ,python-cython)))
+    (propagated-inputs
+     `(("python-numpy" ,python-numpy)))
+    (inputs
+     `(("netcdf" ,netcdf)
+       ("hdf4" ,hdf4)
+       ("hdf5" ,hdf5)))
+    (arguments
+     '(#:phases
+       (modify-phases %standard-phases
+         (replace 'check
+           (lambda _
+             (setenv "NO_NET" "1") ;; disable opendap tests
+             (with-directory-excursion "test"
+               (setenv "PYTHONPATH" ;; find and add the library we just built
+                       (string-append
+                        (car (find-files "../build" "lib.*"
+                                         #:directories? #:t
+                                         #:fail-on-error? #:t))
+                        ":" (getenv "PYTHONPATH")))
+               (zero? (system* "python" "run_all.py"))))))))
+    (home-page
+     "https://github.com/Unidata/netcdf4-python")
+    (synopsis "Python/numpy interface to the netCDF library")
+    (description "Netcdf4-python is a Python interface to the netCDF C
+library.  netCDF version 4 has many features not found in earlier
+versions of the library and is implemented on top of HDF5.  This module
+can read and write files in both the new netCDF 4 and the old netCDF 3
+format, and can create files that are readable by HDF5 clients.  The
+API is modelled after Scientific.IO.NetCDF, and should be familiar to
+users of that module.")
+    (license
+     (license:non-copyleft "https://unidata.github.io/netcdf4-python"))))
+
+(define-public python2-netcdf4
+  (package-with-python2 python-netcdf4))
+
 (define-public python-lockfile
   (package
     (name "python-lockfile")
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] gnu: Add python-netcdf4.
  2016-12-23 15:42 [PATCH] gnu: Add python-netcdf4 Thomas Danckaert
@ 2016-12-24 13:59 ` Marius Bakke
  2016-12-27  9:19   ` Thomas Danckaert
  0 siblings, 1 reply; 4+ messages in thread
From: Marius Bakke @ 2016-12-24 13:59 UTC (permalink / raw)
  To: Thomas Danckaert, guix-devel

[-- Attachment #1: Type: text/plain, Size: 3152 bytes --]

Thomas Danckaert <thomas.danckaert@gmail.com> writes:

> From b4b54b695e286c19332600c38d5e07fabee409f8 Mon Sep 17 00:00:00 2001
> From: Thomas Danckaert <thomas.danckaert@gmail.com>
> Date: Fri, 23 Dec 2016 15:06:43 +0100
> Subject: [PATCH] gnu: Add python-netcdf4.
>
> * gnu/packages/python.scm (python-netcdf4): New variable.
> ---
>  gnu/packages/python.scm | 50 +++++++++++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 50 insertions(+)

Thanks for this! The patch looks good, but the license seems to be ISC
with parts covered by the expat license according to the COPYING file.
Was there any particular reason you linked to the documentation?

> diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm
> index cc53f76..37ad3df 100644
> --- a/gnu/packages/python.scm
> +++ b/gnu/packages/python.scm
> @@ -800,6 +800,56 @@ concepts.")
>  (define-public python2-h5py
>    (package-with-python2 python-h5py))
>  
> +(define-public python-netcdf4
> +  (package
> +    (name "python-netcdf4")
> +    (version "1.2.6")
> +    (source
> +     (origin
> +       (method url-fetch)
> +       (uri (pypi-uri "netCDF4" version))
> +       (sha256
> +        (base32
> +         "1qcymsfxsdfr4sx0vl7ih5d14z66k6c9sjy4gb6rjaksk5387zvg"))))
> +    (build-system python-build-system)
> +    (native-inputs
> +     `(("python-cython" ,python-cython)))
> +    (propagated-inputs
> +     `(("python-numpy" ,python-numpy)))
> +    (inputs
> +     `(("netcdf" ,netcdf)
> +       ("hdf4" ,hdf4)
> +       ("hdf5" ,hdf5)))
> +    (arguments
> +     '(#:phases
> +       (modify-phases %standard-phases
> +         (replace 'check
> +           (lambda _
> +             (setenv "NO_NET" "1") ;; disable opendap tests
> +             (with-directory-excursion "test"
> +               (setenv "PYTHONPATH" ;; find and add the library we just built
> +                       (string-append
> +                        (car (find-files "../build" "lib.*"
> +                                         #:directories? #:t
> +                                         #:fail-on-error? #:t))
> +                        ":" (getenv "PYTHONPATH")))
> +               (zero? (system* "python" "run_all.py"))))))))
> +    (home-page
> +     "https://github.com/Unidata/netcdf4-python")
> +    (synopsis "Python/numpy interface to the netCDF library")
> +    (description "Netcdf4-python is a Python interface to the netCDF C
> +library.  netCDF version 4 has many features not found in earlier
> +versions of the library and is implemented on top of HDF5.  This module
> +can read and write files in both the new netCDF 4 and the old netCDF 3
> +format, and can create files that are readable by HDF5 clients.  The
> +API is modelled after Scientific.IO.NetCDF, and should be familiar to
> +users of that module.")
> +    (license
> +     (license:non-copyleft "https://unidata.github.io/netcdf4-python"))))
> +
> +(define-public python2-netcdf4
> +  (package-with-python2 python-netcdf4))
> +
>  (define-public python-lockfile
>    (package
>      (name "python-lockfile")
> -- 
> 2.7.4

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] gnu: Add python-netcdf4.
  2016-12-24 13:59 ` Marius Bakke
@ 2016-12-27  9:19   ` Thomas Danckaert
  2016-12-27 15:59     ` Marius Bakke
  0 siblings, 1 reply; 4+ messages in thread
From: Thomas Danckaert @ 2016-12-27  9:19 UTC (permalink / raw)
  To: mbakke; +Cc: guix-devel

From: Marius Bakke <mbakke@fastmail.com>
Subject: Re: [PATCH] gnu: Add python-netcdf4.
Date: Sat, 24 Dec 2016 14:59:35 +0100

> Thomas Danckaert <thomas.danckaert@gmail.com> writes:
>
>> From b4b54b695e286c19332600c38d5e07fabee409f8 Mon Sep 17 00:00:00 
>> 2001
>> From: Thomas Danckaert <thomas.danckaert@gmail.com>
>> Date: Fri, 23 Dec 2016 15:06:43 +0100
>> Subject: [PATCH] gnu: Add python-netcdf4.
>>
>> * gnu/packages/python.scm (python-netcdf4): New variable.
>> ---
>>  gnu/packages/python.scm | 50 
>> +++++++++++++++++++++++++++++++++++++++++++++++++
>>  1 file changed, 50 insertions(+)
>
> Thanks for this! The patch looks good, but the license seems to be 
> ISC
> with parts covered by the expat license according to the COPYING 
> file.
> Was there any particular reason you linked to the documentation?

Hi,

yes, you're right.  I linked the documentation because the page 
included a license statement, but now I see the COPYING file in the 
repository is more accurate.  So '(license:isc license:expat) it is.

cheers,

Thomas

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] gnu: Add python-netcdf4.
  2016-12-27  9:19   ` Thomas Danckaert
@ 2016-12-27 15:59     ` Marius Bakke
  0 siblings, 0 replies; 4+ messages in thread
From: Marius Bakke @ 2016-12-27 15:59 UTC (permalink / raw)
  To: Thomas Danckaert; +Cc: guix-devel

[-- Attachment #1: Type: text/plain, Size: 1185 bytes --]

Thomas Danckaert <thomas.danckaert@gmail.com> writes:

> From: Marius Bakke <mbakke@fastmail.com>
> Subject: Re: [PATCH] gnu: Add python-netcdf4.
> Date: Sat, 24 Dec 2016 14:59:35 +0100
>
>> Thomas Danckaert <thomas.danckaert@gmail.com> writes:
>>
>>> From b4b54b695e286c19332600c38d5e07fabee409f8 Mon Sep 17 00:00:00 
>>> 2001
>>> From: Thomas Danckaert <thomas.danckaert@gmail.com>
>>> Date: Fri, 23 Dec 2016 15:06:43 +0100
>>> Subject: [PATCH] gnu: Add python-netcdf4.
>>>
>>> * gnu/packages/python.scm (python-netcdf4): New variable.
>>> ---
>>>  gnu/packages/python.scm | 50 
>>> +++++++++++++++++++++++++++++++++++++++++++++++++
>>>  1 file changed, 50 insertions(+)
>>
>> Thanks for this! The patch looks good, but the license seems to be 
>> ISC
>> with parts covered by the expat license according to the COPYING 
>> file.
>> Was there any particular reason you linked to the documentation?
>
> Hi,
>
> yes, you're right.  I linked the documentation because the page 
> included a license statement, but now I see the COPYING file in the 
> repository is more accurate.  So '(license:isc license:expat) it is.

Thanks for confirming, applied!

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-12-27 15:59 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-12-23 15:42 [PATCH] gnu: Add python-netcdf4 Thomas Danckaert
2016-12-24 13:59 ` Marius Bakke
2016-12-27  9:19   ` Thomas Danckaert
2016-12-27 15:59     ` Marius Bakke

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).