From patchwork Wed May 26 18:00:10 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Vinicius Monego X-Patchwork-Id: 29610 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 9B87F27BC81; Wed, 26 May 2021 19:12:58 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS, T_DKIM_INVALID,URIBL_BLOCKED,URIBL_SBL,URIBL_SBL_A autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 4C13A27BC78 for ; Wed, 26 May 2021 19:12:57 +0100 (BST) Received: from localhost ([::1]:53878 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lly1Y-0001dp-CM for patchwork@mira.cbaines.net; Wed, 26 May 2021 14:12:56 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:55586) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1llxq2-000674-Hl for guix-patches@gnu.org; Wed, 26 May 2021 14:01:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:38324) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1llxq2-00005V-Aq for guix-patches@gnu.org; Wed, 26 May 2021 14:01:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1llxq2-0006RT-8H for guix-patches@gnu.org; Wed, 26 May 2021 14:01:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#48614] [PATCH 3/3] gnu: Add python-cartopy. Resent-From: Vinicius Monego Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 26 May 2021 18:01:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 48614 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: =?utf-8?b?QmrDtnJuIEjDtmZsaW5n?= Cc: 48614@debbugs.gnu.org Received: via spool by 48614-submit@debbugs.gnu.org id=B48614.162205205324183 (code B ref 48614); Wed, 26 May 2021 18:01:02 +0000 Received: (at 48614) by debbugs.gnu.org; 26 May 2021 18:00:53 +0000 Received: from localhost ([127.0.0.1]:49870 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1llxpp-0006E4-7t for submit@debbugs.gnu.org; Wed, 26 May 2021 14:00:53 -0400 Received: from mout01.posteo.de ([185.67.36.65]:58269) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1llxpl-00064A-Pi for 48614@debbugs.gnu.org; Wed, 26 May 2021 14:00:47 -0400 Received: from submission (posteo.de [89.146.220.130]) by mout01.posteo.de (Postfix) with ESMTPS id 5A62A240028 for <48614@debbugs.gnu.org>; Wed, 26 May 2021 20:00:39 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1622052039; bh=hfmrhhZMvpYB+1iTpD3CrSV6eocrwp8p/9Fx+sC/SrM=; h=Subject:From:To:Cc:Date:From; b=MV0FbzwDVtthEE5zyY6WYsX5EGoj4Xjt7NAqotUFjdZ/WCPoAl7pqwduaanWeOoz6 x/yTiTFOT+kyuiqK0VRPA3hQabTN3cPkW8wVF7fNy+EZBAdEz4Psyz7wNwJtPgToSK D0MjSIVALR3kPWc7xWiFHQJNsuH+whG73HyeIt/dGmR7EP2pOjNrFErPStiN85gTdi GastSCCV7ARxQoXyDZoAfaSUYMIwjpsUvL2Yu9P9G9HKrfqNBOp0MyjQCosajT/1aB 8I+tYxnxN7755cF/hLoAgJiaAlcxfJriirEl4cqV4vRe0St4xEzdCYOd2hRBWZnj6C MpAXRuISX5Phg== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 4FqzJM6M7gz9rxK; Wed, 26 May 2021 20:00:35 +0200 (CEST) Message-ID: <5c9b02bbd244c522334ac9524eb79010e426feb2.camel@posteo.net> From: Vinicius Monego Date: Wed, 26 May 2021 18:00:10 +0000 In-Reply-To: <20210525011145.0a70f8ff@alma-ubu.fritz.box> References: <20210523193134.425937-1-monego@posteo.net> <20210523193134.425937-3-monego@posteo.net> <20210525011145.0a70f8ff@alma-ubu.fritz.box> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches 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 From f19c7e5644181549ff8129477c7ee5ecdb009666 Mon Sep 17 00:00:00 2001 From: Vinicius Monego Date: Tue, 18 May 2021 20:54:14 -0300 Subject: [PATCH v2 3/3] gnu: Add python-cartopy. * gnu/packages/geo.scm (python-cartopy): New variable. --- gnu/packages/geo.scm | 56 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) diff --git a/gnu/packages/geo.scm b/gnu/packages/geo.scm index b0d0b64a2d..1fdaf911f0 100644 --- a/gnu/packages/geo.scm +++ b/gnu/packages/geo.scm @@ -913,6 +913,62 @@ utilities for data translation and processing.") "The Python Shapefile Library (PyShp) reads and writes ESRI Shapefiles.") (license license:expat))) +(define-public python-cartopy + (package + (name "python-cartopy") + ;; This is a post-release fix that adds build_ext to setup.py. + (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 postgis (package (name "postgis") -- 2.31.1