gnu: python-rtree: Update to 1.0.0.

* gnu/packages/geo.scm (python-rtree): Update to 1.0.0.
[arguments]: Fix 'find-libspatialindex phase.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
This commit is contained in:
Felix Gruber 2022-05-19 19:46:05 +00:00 committed by Ludovic Courtès
parent 13bc438a20
commit 41ab2f0d76
No known key found for this signature in database
GPG key ID: 090B11993D9AEBB5

View file

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