2021-01-13 23:06:55 +00:00
|
|
|
{ lib
|
|
|
|
, async_generator
|
2018-10-26 16:14:38 +00:00
|
|
|
, buildPythonPackage
|
2019-11-12 18:12:56 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, geographiclib
|
2021-01-13 23:06:55 +00:00
|
|
|
, isPy3k
|
|
|
|
, pytestCheckHook
|
2018-10-26 16:14:38 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
2021-01-07 12:12:06 +00:00
|
|
|
pname = "geopy";
|
2021-07-12 07:53:24 +00:00
|
|
|
version = "2.2.0";
|
2019-11-12 18:12:56 +00:00
|
|
|
disabled = !isPy3k; # only Python 3
|
2018-10-26 16:14:38 +00:00
|
|
|
|
2019-11-12 18:12:56 +00:00
|
|
|
src = fetchFromGitHub {
|
2021-01-07 12:12:06 +00:00
|
|
|
owner = pname;
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2021-07-12 07:53:24 +00:00
|
|
|
sha256 = "sha256-zFz0T/M/CABKkChuiKsFkWj2pphZuFeE5gz0HxZYaz8=";
|
2019-11-12 18:12:56 +00:00
|
|
|
};
|
2018-10-26 16:14:38 +00:00
|
|
|
|
2021-01-13 23:06:55 +00:00
|
|
|
propagatedBuildInputs = [ geographiclib ];
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
async_generator
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
|
|
|
# Exclude tests which perform API calls
|
|
|
|
pytestFlagsArray = [ "--ignore test/geocoders/" ];
|
|
|
|
pythonImportsCheck = [ "geopy" ];
|
|
|
|
|
|
|
|
__darwinAllowLocalNetworking = true;
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2018-10-26 16:14:38 +00:00
|
|
|
homepage = "https://github.com/geopy/geopy";
|
|
|
|
description = "Python Geocoding Toolbox";
|
2021-01-13 23:06:55 +00:00
|
|
|
changelog = "https://github.com/geopy/geopy/releases/tag/${version}";
|
|
|
|
license = with licenses; [ mit ];
|
|
|
|
maintainers = with maintainers; [ GuillaumeDesforges ];
|
2018-10-26 16:14:38 +00:00
|
|
|
};
|
|
|
|
}
|