GNU bug report logs - #55528
[PATCH 0/2] Add python-osmnx

Previous Next

Package: guix-patches;

Reported by: Felix Gruber <felgru <at> posteo.net>

Date: Thu, 19 May 2022 19:45:01 UTC

Severity: normal

Tags: patch

Done: Ludovic Courtès <ludo <at> gnu.org>

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 55528 in the body.
You can then email your comments to 55528 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#55528; Package guix-patches. (Thu, 19 May 2022 19:45:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Felix Gruber <felgru <at> posteo.net>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Thu, 19 May 2022 19:45:01 GMT) Full text and rfc822 format available.

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

From: Felix Gruber <felgru <at> posteo.net>
To: guix-patches <at> gnu.org
Cc: Felix Gruber <felgru <at> posteo.net>
Subject: [PATCH 0/2] Add python-osmnx
Date: Thu, 19 May 2022 19:44:07 +0000
This patchset adds the OSMnx Python library for working with
OpenStreetMap data.

Felix Gruber (2):
  gnu: python-rtree: Update to 1.0.0.
  gnu: Add python-osmnx

 gnu/packages/geo.scm | 82 +++++++++++++++++++++++++++++++++++++++-----
 1 file changed, 74 insertions(+), 8 deletions(-)

-- 
2.30.2





Information forwarded to guix-patches <at> gnu.org:
bug#55528; Package guix-patches. (Thu, 19 May 2022 19:47:01 GMT) Full text and rfc822 format available.

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

From: Felix Gruber <felgru <at> posteo.net>
To: 55528 <at> debbugs.gnu.org
Cc: Felix Gruber <felgru <at> posteo.net>
Subject: [PATCH 1/2] gnu: python-rtree: Update to 1.0.0.
Date: Thu, 19 May 2022 19:46:05 +0000
* gnu/packages/geo.scm (python-rtree): Update to 1.0.0.
[arguments]: Fix 'find-libspatialindex phase.
---
 gnu/packages/geo.scm | 17 +++++++++--------
 1 file changed, 9 insertions(+), 8 deletions(-)

diff --git a/gnu/packages/geo.scm b/gnu/packages/geo.scm
index 0c9240eea7..37a3e6d179 100644
--- a/gnu/packages/geo.scm
+++ b/gnu/packages/geo.scm
@@ -1486,27 +1486,28 @@ persisted.
 (define-public python-rtree
   (package
     (name "python-rtree")
-    (version "0.9.7")
+    (version "1.0.0")
     (source
      (origin
        (method url-fetch)
        (uri (pypi-uri "Rtree" version))
        (sha256
-        (base32 "0gna530vy6rh76035cqh7i2lx199cvxjrzjczg9rm6k96k5751xy"))))
+        (base32 "10lnhf67c9pb0yisxdqmb52dy6lj1za1h9d4p69v0ihk2a138j6h"))))
     (build-system python-build-system)
     (arguments
      `(#:phases
        (modify-phases %standard-phases
          (add-after 'unpack 'find-libspatialindex
            (lambda* (#:key inputs #:allow-other-keys)
-             (setenv "SPATIALINDEX_C_LIBRARY"
-                     (string-append (assoc-ref inputs "libspatialindex")
-                                    "/lib/libspatialindex.so"))))
+             (let ((libspatialindex (assoc-ref inputs "libspatialindex")))
+               (substitute* "rtree/finder.py"
+                 (("find_library\\(\"spatialindex_c\"\\)")
+                  (string-append  "\"" libspatialindex
+                                  "/lib/libspatialindex_c.so\""))))))
          (replace 'check
-           (lambda* (#:key inputs outputs tests? #:allow-other-keys)
+           (lambda* (#:key outputs tests? #:allow-other-keys)
              (when tests?
-               (add-installed-pythonpath inputs outputs)
-               (invoke "python" "-m" "pytest")))))))
+                 (invoke "pytest")))))))
     (native-inputs
      (list python-numpy python-pytest python-wheel))
     (inputs
-- 
2.30.2





Information forwarded to guix-patches <at> gnu.org:
bug#55528; Package guix-patches. (Thu, 19 May 2022 19:47:02 GMT) Full text and rfc822 format available.

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

From: Felix Gruber <felgru <at> posteo.net>
To: 55528 <at> debbugs.gnu.org
Cc: Felix Gruber <felgru <at> posteo.net>
Subject: [PATCH 2/2] gnu: Add python-osmnx
Date: Thu, 19 May 2022 19:46:06 +0000
* gnu/packages/geo.scm (python-osmnx): New variable.
---
 gnu/packages/geo.scm | 65 ++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 65 insertions(+)

diff --git a/gnu/packages/geo.scm b/gnu/packages/geo.scm
index 37a3e6d179..ea7483f16f 100644
--- a/gnu/packages/geo.scm
+++ b/gnu/packages/geo.scm
@@ -739,6 +739,71 @@ enables you to easily do operations in Python that would otherwise
 require a spatial database such as PostGIS.")
     (license license:bsd-3)))
 
+(define-public python-osmnx
+  (package
+    (name "python-osmnx")
+    (version "1.1.2")
+    (source
+     (origin
+       ; Fetch from github as the pypi package is missing the tests dir.
+       (method git-fetch)
+       (uri (git-reference
+             (url "https://github.com/gboeing/osmnx")
+             (commit (string-append "v" version))))
+       (file-name (git-file-name name version))
+       (sha256
+        (base32 "1n8qjn184p5a2s3j6x6iyc1i7p3l3xnbqqxm6ajwgwv6j5fw1d5a"))))
+    (build-system python-build-system)
+    (arguments
+     '(#:phases
+       (modify-phases %standard-phases
+         (replace 'check
+           (lambda* (#:key tests? inputs outputs #:allow-other-keys)
+             (when tests?
+               (add-installed-pythonpath inputs outputs)
+               ; TODO: Disable network tests
+               (invoke "pytest" "tests"
+                       "-k"
+                       (string-append
+                         ;; The following tests require network access.
+                         "not test_geocode_to_gdf"
+                         " and not test_stats"
+                         " and not test_osm_xml"
+                         " and not test_elevation"
+                         " and not test_routing"
+                         " and not test_plots"
+                         " and not test_find_nearest"
+                         " and not test_api_endpoints"
+                         " and not test_graph_save_load"
+                         " and not test_graph_from_functions"
+                         " and not test_geometries"))))))))
+    (propagated-inputs
+      (list python-folium
+            python-geopandas
+            python-matplotlib
+            python-networkx
+            python-numpy
+            python-pandas
+            python-pyproj
+            python-requests
+            python-rtree
+            python-shapely))
+    (native-inputs
+      (list python-numpy python-pytest))
+    (home-page "https://github.com/gboeing/osmnx")
+    (synopsis
+      "Retrieve, model, analyze, and visualize OpenStreetMap street networks")
+    (description
+      "OSMnx is a Python library that lets you download geospatial data
+from OpenStreetMap and model, project, visualize, and analyze real-world
+street networks and any other geospatial geometries.  You can download
+and model walkable, drivable, or bikeable urban networks with a single
+line of Python code then easily analyze and visualize them.  You can
+just as easily download and work with other infrastructure types,
+amenities/points of interest, building footprints, elevation data,
+street bearings/orientations, and speed/travel time.")
+    (license license:expat)))
+
 (define-public mapnik
   (package
     (name "mapnik")
-- 
2.30.2





Reply sent to Ludovic Courtès <ludo <at> gnu.org>:
You have taken responsibility. (Wed, 01 Jun 2022 21:10:02 GMT) Full text and rfc822 format available.

Notification sent to Felix Gruber <felgru <at> posteo.net>:
bug acknowledged by developer. (Wed, 01 Jun 2022 21:10:02 GMT) Full text and rfc822 format available.

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

From: Ludovic Courtès <ludo <at> gnu.org>
To: Felix Gruber <felgru <at> posteo.net>
Cc: 55528-done <at> debbugs.gnu.org
Subject: Re: bug#55528: [PATCH 0/2] Add python-osmnx
Date: Wed, 01 Jun 2022 23:09:40 +0200
Hi,

Felix Gruber <felgru <at> posteo.net> skribis:

>   gnu: python-rtree: Update to 1.0.0.
>   gnu: Add python-osmnx

Applied, thanks!

Ludo’.




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

This bug report was last modified 1 year and 306 days ago.

Previous Next


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