diff mbox series

[bug#50812,v2,5/5] gnu: Add python-geopandas.

Message ID 20210926174150.26146-6-felgru@posteo.net
State Accepted
Headers show
Series None | expand

Commit Message

Felix Gruber Sept. 26, 2021, 5:41 p.m. UTC
* gnu/packages/geo.scm (python-geopandas): New variable.
---
 gnu/packages/geo.scm | 41 +++++++++++++++++++++++++++++++++++++++++
 1 file changed, 41 insertions(+)

Comments

Xinglu Chen Sept. 26, 2021, 8:51 p.m. UTC | #1
On Sun, Sep 26 2021, Felix Gruber wrote:

> * gnu/packages/geo.scm (python-geopandas): New variable.
> ---
>  gnu/packages/geo.scm | 41 +++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 41 insertions(+)
>
> diff --git a/gnu/packages/geo.scm b/gnu/packages/geo.scm
> index e47f97bf8c..8c2458ee0b 100644
> --- a/gnu/packages/geo.scm
> +++ b/gnu/packages/geo.scm
> @@ -731,6 +731,47 @@ integrates readily with other Python GIS packages such as pyproj, Rtree,
>  and Shapely.")
>      (license license:bsd-3)))
>  
> +(define-public python-geopandas
> +  (package
> +    (name "python-geopandas")
> +    (version "0.9.0")
> +    (source
> +      (origin
> +        (method url-fetch)
> +        (uri (pypi-uri "geopandas" version))
> +        (sha256
> +          (base32
> +            "02k389zyyjv51gd09c92vlr83sv46awdq0066jgh5i24vjs2m5v3"))))
> +    (build-system python-build-system)
> +    (arguments
> +     '(#:phases
> +       (modify-phases %standard-phases
> +         (replace 'check
> +           (lambda* (#:key tests? outputs #:allow-other-keys)

The ‘outputs’ argument isn’t used

> +             (when tests?
> +                 (invoke "pytest"
> +                         ; Disable test that fails with
> +                         ; NotImplementedError in pandas.
> +                         "-k" "not test_fillna_no_op_returns_copy"
> +                         ; Disable tests that require internet access.
> +                         "-m" "not web")))))))

The indentation for the (when ...) form looks a bit off.

> +    (propagated-inputs
> +      `(("python-fiona" ,python-fiona)
> +        ("python-pandas" ,python-pandas)
> +        ("python-pyproj" ,python-pyproj)
> +        ("python-shapely" ,python-shapely)))
> +    (native-inputs
> +      `(("python-pytest" ,python-pytest)))
> +    (home-page "http://geopandas.org")
> +    (synopsis "Geographic pandas extensions")
> +    (description "The goal of GeoPandas is to make working with
> +geospatial data in python easier.  It combines the capabilities of
> +pandas and shapely, providing geospatial operations in pandas and a

“pandas” should probably be capitalized.

> +high-level interface to multiple geometries to shapely.  GeoPandas
> +enables you to easily do operations in python that would otherwise

“python” should also be capitalized.

> +require a spatial database such as PostGIS.")
> +    (license license:bsd-3)))
> +
>  (define-public mapnik
>    (package
>      (name "mapnik")
> -- 
> 2.30.2
diff mbox series

Patch

diff --git a/gnu/packages/geo.scm b/gnu/packages/geo.scm
index e47f97bf8c..8c2458ee0b 100644
--- a/gnu/packages/geo.scm
+++ b/gnu/packages/geo.scm
@@ -731,6 +731,47 @@  integrates readily with other Python GIS packages such as pyproj, Rtree,
 and Shapely.")
     (license license:bsd-3)))
 
+(define-public python-geopandas
+  (package
+    (name "python-geopandas")
+    (version "0.9.0")
+    (source
+      (origin
+        (method url-fetch)
+        (uri (pypi-uri "geopandas" version))
+        (sha256
+          (base32
+            "02k389zyyjv51gd09c92vlr83sv46awdq0066jgh5i24vjs2m5v3"))))
+    (build-system python-build-system)
+    (arguments
+     '(#:phases
+       (modify-phases %standard-phases
+         (replace 'check
+           (lambda* (#:key tests? outputs #:allow-other-keys)
+             (when tests?
+                 (invoke "pytest"
+                         ; Disable test that fails with
+                         ; NotImplementedError in pandas.
+                         "-k" "not test_fillna_no_op_returns_copy"
+                         ; Disable tests that require internet access.
+                         "-m" "not web")))))))
+    (propagated-inputs
+      `(("python-fiona" ,python-fiona)
+        ("python-pandas" ,python-pandas)
+        ("python-pyproj" ,python-pyproj)
+        ("python-shapely" ,python-shapely)))
+    (native-inputs
+      `(("python-pytest" ,python-pytest)))
+    (home-page "http://geopandas.org")
+    (synopsis "Geographic pandas extensions")
+    (description "The goal of GeoPandas is to make working with
+geospatial data in python easier.  It combines the capabilities of
+pandas and shapely, providing geospatial operations in pandas and a
+high-level interface to multiple geometries to shapely.  GeoPandas
+enables you to easily do operations in python that would otherwise
+require a spatial database such as PostGIS.")
+    (license license:bsd-3)))
+
 (define-public mapnik
   (package
     (name "mapnik")