all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Vinicius Monego <monego@posteo.net>
To: 51854@debbugs.gnu.org
Cc: Vinicius Monego <monego@posteo.net>
Subject: [bug#51854] [PATCH] gnu: Add python-rtree.
Date: Sun, 14 Nov 2021 23:00:52 +0000	[thread overview]
Message-ID: <20211114230052.723681-1-monego@posteo.net> (raw)

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

diff --git a/gnu/packages/geo.scm b/gnu/packages/geo.scm
index adfec13b4f..d70e2f6cc3 100644
--- a/gnu/packages/geo.scm
+++ b/gnu/packages/geo.scm
@@ -92,6 +92,7 @@
   #:use-module (gnu packages protobuf)
   #:use-module (gnu packages pulseaudio)
   #:use-module (gnu packages python)
+  #:use-module (gnu packages python-build)
   #:use-module (gnu packages python-check)
   #:use-module (gnu packages python-crypto)
   #:use-module (gnu packages python-science)
@@ -1468,6 +1469,42 @@ persisted.
 ")
     (license license:expat)))
 
+(define-public python-rtree
+  (package
+    (name "python-rtree")
+    (version "0.9.7")
+    (source
+     (origin
+       (method url-fetch)
+       (uri (pypi-uri "Rtree" version))
+       (sha256
+        (base32 "0gna530vy6rh76035cqh7i2lx199cvxjrzjczg9rm6k96k5751xy"))))
+    (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"))))
+         (replace 'check
+           (lambda* (#:key inputs outputs tests? #:allow-other-keys)
+             (when tests?
+               (add-installed-pythonpath inputs outputs)
+               (invoke "python" "-m" "pytest")))))))
+    (native-inputs
+     `(("python-numpy" ,python-numpy)
+       ("python-pytest" ,python-pytest)
+       ("python-wheel" ,python-wheel)))
+    (inputs
+     `(("libspatialindex" ,libspatialindex)))
+    (home-page "https://github.com/Toblerity/rtree")
+    (synopsis "R-Tree spatial index for Python GIS")
+    (description
+     "RTree is a Python package with bindings for @code{libspatialindex}.")
+    (license license:expat)))
+
 (define-public java-jmapviewer
   (package
     (name "java-jmapviewer")

base-commit: 193d7b5b450d2004c26720e488a9cce930542e9e
-- 
2.30.2





             reply	other threads:[~2021-11-14 23:02 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-14 23:00 Vinicius Monego [this message]
2021-11-15 16:55 ` bug#51854: [PATCH] gnu: Add python-rtree Guillaume Le Vaillant

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211114230052.723681-1-monego@posteo.net \
    --to=monego@posteo.net \
    --cc=51854@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.