GNU bug report logs - #48614
[PATCH 0/3] gnu: Add python-cartopy.

Previous Next

Package: guix-patches;

Reported by: Vinicius Monego <monego <at> posteo.net>

Date: Sun, 23 May 2021 19:31:02 UTC

Severity: normal

Tags: patch

Done: Björn Höfling <bjoern.hoefling <at> bjoernhoefling.de>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 48614 in the body.
You can then email your comments to 48614 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#48614; Package guix-patches. (Sun, 23 May 2021 19:31:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Vinicius Monego <monego <at> posteo.net>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Sun, 23 May 2021 19:31:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Vinicius Monego <monego <at> posteo.net>
To: guix-patches <at> gnu.org
Cc: Vinicius Monego <monego <at> posteo.net>
Subject: [PATCH 0/3] gnu: Add python-cartopy.
Date: Sun, 23 May 2021 19:29:31 +0000
Vinicius Monego (3):
  gnu: Add python-pyshp.
  gnu: Add python-pykdtree.
  gnu: Add python-cartopy.

 gnu/packages/python-science.scm | 56 +++++++++++++++++++++++++++++++++
 gnu/packages/python-xyz.scm     | 53 +++++++++++++++++++++++++++++++
 2 files changed, 109 insertions(+)

-- 
2.31.1





Information forwarded to guix-patches <at> gnu.org:
bug#48614; Package guix-patches. (Sun, 23 May 2021 19:33:01 GMT) Full text and rfc822 format available.

Message #8 received at 48614 <at> debbugs.gnu.org (full text, mbox):

From: Vinicius Monego <monego <at> posteo.net>
To: 48614 <at> debbugs.gnu.org
Cc: Vinicius Monego <monego <at> posteo.net>
Subject: [PATCH 1/3] gnu: Add python-pyshp.
Date: Sun, 23 May 2021 19:31:31 +0000
* gnu/packages/python-xyz.scm (python-pyshp): New variable.
---
 gnu/packages/python-xyz.scm | 31 +++++++++++++++++++++++++++++++
 1 file changed, 31 insertions(+)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index f79fc54e24..18410dac39 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -5806,6 +5806,37 @@ operators such as union, intersection, and difference.")
 (define-public python2-pysnptools
   (package-with-python2 python-pysnptools))
 
+(define-public python-pyshp
+  (package
+    (name "python-pyshp")
+    (version "2.1.3")
+    (source
+     (origin
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/GeospatialPython/pyshp")
+             (commit version)))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "0jsraqzq82pw19wvx84x7w5cs8agr44a9b5y0jjw540wim4xa73r"))))
+    (build-system python-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (replace 'check
+           (lambda* (#:key tests? #:allow-other-keys)
+             (when tests?
+               ;; This is the only test file.
+               (invoke "python" "-m" "pytest" "test_shapefile.py")))))))
+    (native-inputs
+     `(("python-pytest" ,python-pytest)
+       ("python-pytest-runner" ,python-pytest-runner)))
+    (home-page "https://github.com/GeospatialPython/pyshp")
+    (synopsis "Read/write support for ESRI Shapefile format")
+    (description
+      "The Python Shapefile Library (PyShp) reads and writes ESRI Shapefiles.")
+    (license license:expat)))
+
 (define-public python-wurlitzer
   (package
     (name "python-wurlitzer")
-- 
2.31.1





Information forwarded to guix-patches <at> gnu.org:
bug#48614; Package guix-patches. (Sun, 23 May 2021 19:33:02 GMT) Full text and rfc822 format available.

Message #11 received at 48614 <at> debbugs.gnu.org (full text, mbox):

From: Vinicius Monego <monego <at> posteo.net>
To: 48614 <at> debbugs.gnu.org
Cc: Vinicius Monego <monego <at> posteo.net>
Subject: [PATCH 2/3] gnu: Add python-pykdtree.
Date: Sun, 23 May 2021 19:31:32 +0000
* gnu/packages/python-xyz.scm (python-pykdtree): New variable.
---
 gnu/packages/python-xyz.scm | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 18410dac39..4c8774cd60 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -5837,6 +5837,28 @@ operators such as union, intersection, and difference.")
       "The Python Shapefile Library (PyShp) reads and writes ESRI Shapefiles.")
     (license license:expat)))
 
+(define-public python-pykdtree
+  (package
+    (name "python-pykdtree")
+    (version "1.3.4")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "pykdtree" version))
+       (sha256
+        (base32 "0p8n2ljdacfixkiw092974dmhy4s1c0h032ii1z9kwi9h5h5rgmy"))))
+    (build-system python-build-system)
+    (native-inputs
+     `(("python-nose" ,python-nose)))
+    (propagated-inputs
+     `(("python-numpy" ,python-numpy)))
+    (home-page "https://github.com/storpipfugl/pykdtree")
+    (synopsis "Fast kd-tree implementation with OpenMP-enabled queries")
+    (description
+     "@code{pykdtree} is a kd-tree implementation for fast nearest neighbour
+search in Python.")
+    (license license:lgpl3+)))
+
 (define-public python-wurlitzer
   (package
     (name "python-wurlitzer")
-- 
2.31.1





Information forwarded to guix-patches <at> gnu.org:
bug#48614; Package guix-patches. (Sun, 23 May 2021 19:33:02 GMT) Full text and rfc822 format available.

Message #14 received at 48614 <at> debbugs.gnu.org (full text, mbox):

From: Vinicius Monego <monego <at> posteo.net>
To: 48614 <at> debbugs.gnu.org
Cc: Vinicius Monego <monego <at> posteo.net>
Subject: [PATCH 3/3] gnu: Add python-cartopy.
Date: Sun, 23 May 2021 19:31:33 +0000
* gnu/packages/python-science.scm (python-cartopy): New variable.
---
 gnu/packages/python-science.scm | 56 +++++++++++++++++++++++++++++++++
 1 file changed, 56 insertions(+)

diff --git a/gnu/packages/python-science.scm b/gnu/packages/python-science.scm
index 79ee7c8bb2..9d4edaa4df 100644
--- a/gnu/packages/python-science.scm
+++ b/gnu/packages/python-science.scm
@@ -33,6 +33,7 @@
   #:use-module (gnu packages base)
   #:use-module (gnu packages check)
   #:use-module (gnu packages gcc)
+  #:use-module (gnu packages geo)
   #:use-module (gnu packages maths)
   #:use-module (gnu packages perl)
   #:use-module (gnu packages python)
@@ -208,6 +209,61 @@ depends on @code{scipy.weave}.  For new code, users are recommended to use
 Cython.")
     (license license:bsd-3)))
 
+(define-public python-cartopy
+  (package
+    (name "python-cartopy")
+    (version "0.19.0.post1")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "Cartopy" version))
+       (sha256
+        (base32 "0xnm8z3as3hriivdfd26s6vn5b63gb46x6vxw6gh1mwfm5rlg2sb"))))
+    (build-system python-build-system)
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (replace 'check
+           (lambda* (#:key inputs outputs tests? #:allow-other-keys)
+             (when tests?
+               (add-installed-pythonpath inputs outputs)
+               (invoke "python" "-m" "pytest" "--pyargs" "cartopy"
+                       ;; These tests require online data.
+                       "-m" "not natural_earth and not network"
+                       ;; This one too but it's not marked as such.
+                       "-k" "not test_gridliner_labels_bbox_style")))))))
+    (propagated-inputs
+     `(("python-matplotlib" ,python-matplotlib)
+       ("python-numpy" ,python-numpy)
+       ("python-pykdtree" ,python-pykdtree)
+       ("python-pyshp" ,python-pyshp)
+       ("python-scipy" ,python-scipy)
+       ("python-shapely" ,python-shapely)))
+    (inputs
+     `(("geos" ,geos)
+       ("proj" ,proj)))
+    (native-inputs
+     `(("python-cython" ,python-cython)
+       ("python-flufl-lock" ,python-flufl-lock)
+       ("python-pytest" ,python-pytest)))
+    (home-page "https://scitools.org.uk/cartopy/docs/latest/")
+    (synopsis "Cartographic library for visualisation")
+    (description
+     "Cartopy is a Python package designed to make drawing maps for data
+analysis and visualisation easy.
+
+It features:
+
+@itemize
+@item object oriented projection definitions
+@item point, line, polygon and image transformations between projections
+@item integration to expose advanced mapping in Matplotlib with a simple and
+intuitive interface
+@item powerful vector data handling by integrating shapefile reading with
+Shapely capabilities
+@end itemize")
+    (license license:lgpl3+)))
+
 (define-public python-scikit-fuzzy
   (package
     (name "python-scikit-fuzzy")
-- 
2.31.1





Information forwarded to guix-patches <at> gnu.org:
bug#48614; Package guix-patches. (Mon, 24 May 2021 23:12:02 GMT) Full text and rfc822 format available.

Message #17 received at 48614 <at> debbugs.gnu.org (full text, mbox):

From: Björn Höfling <bjoern.hoefling <at> bjoernhoefling.de>
To: Vinicius Monego <monego <at> posteo.net>
Cc: 48614 <at> debbugs.gnu.org
Subject: Re: [bug#48614] [PATCH 3/3] gnu: Add python-cartopy.
Date: Tue, 25 May 2021 01:11:45 +0200
[Message part 1 (text/plain, inline)]
Hi Vinicius,

thanks for your contribution. this patch series looks good, except of
some little requarks:

- I would prefer to add python-cartopy and python-pyshp to geo.scm, as
to have all Geo/Cartographic packages there. Or is there a reason to
have it in python-xyz.scm? WDYT?

- If you move it, add a copyright line for you.

On Sun, 23 May 2021 19:31:33 +0000
Vinicius Monego <monego <at> posteo.net> wrote:

> * gnu/packages/python-science.scm (python-cartopy): New variable.

> +(define-public python-cartopy
> +  (package
> +    (name "python-cartopy")
> +    (version "0.19.0.post1")

Is this a pre-release/beta? Ah, no: It's a POST-release fix. Maybe add
a comment to explain?

Thanks,

Björn
[Message part 2 (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#48614; Package guix-patches. (Wed, 26 May 2021 18:01:02 GMT) Full text and rfc822 format available.

Message #20 received at 48614 <at> debbugs.gnu.org (full text, mbox):

From: Vinicius Monego <monego <at> posteo.net>
To: Björn Höfling <bjoern.hoefling <at> bjoernhoefling.de>
Cc: 48614 <at> debbugs.gnu.org
Subject: Re: [bug#48614] [PATCH 3/3] gnu: Add python-cartopy.
Date: Wed, 26 May 2021 18:00:10 +0000
[Message part 1 (text/plain, inline)]
Hi Björn,

Sending a v2 with your suggestions.

> Or is there a reason to have it in python-xyz.scm? WDYT?

My personal preference is to have Python modules in python-* files,
similar to how python-crypto and python-web are separate from crypto
and web. But I'm not strong on this. Also, creating python-geo for this
set would seem more controversial.

As a side note, there's a problem in python-shapely that it can't find
libgeos and that will break cartopy at runtime :(

Vinicius
[v2-0001-gnu-Add-python-pyshp.patch (text/x-patch, attachment)]
[v2-0002-gnu-Add-python-pykdtree.patch (text/x-patch, attachment)]
[v2-0003-gnu-Add-python-cartopy.patch (text/x-patch, attachment)]

Reply sent to Björn Höfling <bjoern.hoefling <at> bjoernhoefling.de>:
You have taken responsibility. (Wed, 23 Jun 2021 04:55:02 GMT) Full text and rfc822 format available.

Notification sent to Vinicius Monego <monego <at> posteo.net>:
bug acknowledged by developer. (Wed, 23 Jun 2021 04:55:02 GMT) Full text and rfc822 format available.

Message #25 received at 48614-done <at> debbugs.gnu.org (full text, mbox):

From: Björn Höfling <bjoern.hoefling <at> bjoernhoefling.de>
To: Vinicius Monego <monego <at> posteo.net>
Cc: 48614-done <at> debbugs.gnu.org
Subject: Re: [bug#48614] [PATCH 3/3] gnu: Add python-cartopy.
Date: Wed, 23 Jun 2021 06:53:59 +0200
[Message part 1 (text/plain, inline)]
On Wed, 26 May 2021 18:00:10 +0000
Vinicius Monego <monego <at> posteo.net> wrote:

> Hi Björn,
> 
> Sending a v2 with your suggestions.
> 
> > Or is there a reason to have it in python-xyz.scm? WDYT?  
> 
> My personal preference is to have Python modules in python-* files,
> similar to how python-crypto and python-web are separate from crypto
> and web. But I'm not strong on this. Also, creating python-geo for
> this set would seem more controversial.

Pushed as

5ab7fbad27c652bb2a7143995970e8b5886a0cb6


Thanks.
 
> As a side note, there's a problem in python-shapely that it can't find
> libgeos and that will break cartopy at runtime :(

I tried out some examples from the gallery, they worked very nicely. Do
you still have problems? If so, would you fill out a bug report?

Björn
[Message part 2 (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#48614; Package guix-patches. (Wed, 23 Jun 2021 10:07:01 GMT) Full text and rfc822 format available.

Message #28 received at 48614-done <at> debbugs.gnu.org (full text, mbox):

From: Vinicius Monego <monego <at> posteo.net>
To: Björn Höfling <bjoern.hoefling <at> bjoernhoefling.de>
Cc: 48614-done <at> debbugs.gnu.org
Subject: Re: [bug#48614] [PATCH 3/3] gnu: Add python-cartopy.
Date: Wed, 23 Jun 2021 10:06:02 +0000
>  
> > As a side note, there's a problem in python-shapely that it can't
> > find
> > libgeos and that will break cartopy at runtime :(
> 
> I tried out some examples from the gallery, they worked very nicely.
> Do
> you still have problems? If so, would you fill out a bug report?
> 
> Björn

The problem was that I had an environment variable that fooled shapely
into thinking it was running from conda. I solved it by running guix
environment with --pure.

I'll send a followup series with scitools-iris later this week.





bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Wed, 21 Jul 2021 11:24:05 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 277 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.