gnu: Add python-haversine.

* gnu/packages/geo.scm (python-haversine): New variable.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
This commit is contained in:
jgart 2023-01-02 19:39:05 -06:00 committed by Ludovic Courtès
parent d1e0a0528a
commit d7552c36ce
No known key found for this signature in database
GPG key ID: 090B11993D9AEBB5

View file

@ -2826,6 +2826,36 @@ (define-public python-geopy
using third-party geocoders and other data sources.") using third-party geocoders and other data sources.")
(license license:expat))) (license license:expat)))
(define-public python-haversine
(package
(name "python-haversine")
(version "2.7.0")
(source (origin
(method git-fetch)
(uri (git-reference
;; There are no tests in the PyPi archive.
(url "https://github.com/mapado/haversine")
(commit (string-append "v" version))))
(file-name (git-file-name name version))
(sha256
(base32
"0inxyj5n4jzgg5xiadqx9sk83gdx5ff989l9s04smdzbd3b8c0c8"))))
(build-system python-build-system)
(native-inputs (list python-pytest python-numpy))
(arguments
(list #:phases
#~(modify-phases %standard-phases
(replace 'check
(lambda* (#:key tests? inputs #:allow-other-keys)
(when tests?
(invoke "pytest")))))))
(home-page "https://github.com/mapado/haversine")
(synopsis "Calculate the distance between 2 points on Earth")
(description "This package provides functions to calculate the
distance in various units between two points on Earth using their
latitude and longitude.")
(license license:expat)))
(define-public gplates (define-public gplates
(package (package
(name "gplates") (name "gplates")