2021-01-13 23:06:55 +00:00
|
|
|
{ lib
|
|
|
|
, async_generator
|
2018-10-26 17:14:38 +01: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 17:14:38 +01:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
2021-01-07 12:12:06 +00:00
|
|
|
pname = "geopy";
|
|
|
|
version = "2.1.0";
|
2019-11-12 18:12:56 +00:00
|
|
|
disabled = !isPy3k; # only Python 3
|
2018-10-26 17:14:38 +01: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;
|
|
|
|
sha256 = "0239a4achk49ngagb6aqy6cgzfwgbxir07vwi13ysbpx78y0l4g9";
|
2019-11-12 18:12:56 +00:00
|
|
|
};
|
2018-10-26 17:14:38 +01: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 17:14:38 +01: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 17:14:38 +01:00
|
|
|
};
|
|
|
|
}
|