2021-01-15 22:18:51 +00:00
|
|
|
{ lib
|
|
|
|
, async_generator
|
2020-04-24 23:36:52 +00:00
|
|
|
, buildPythonPackage
|
2022-08-12 12:06:08 +00:00
|
|
|
, docutils
|
2020-04-24 23:36:52 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, geographiclib
|
2021-01-15 22:18:51 +00:00
|
|
|
, pytestCheckHook
|
2022-08-12 12:06:08 +00:00
|
|
|
, pythonOlder
|
|
|
|
, pytz
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
2021-01-15 22:18:51 +00:00
|
|
|
pname = "geopy";
|
2021-07-14 22:03:04 +00:00
|
|
|
version = "2.2.0";
|
2022-08-12 12:06:08 +00:00
|
|
|
disabled = pythonOlder "3.5";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2021-01-15 22:18:51 +00:00
|
|
|
owner = pname;
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2021-07-14 22:03:04 +00:00
|
|
|
sha256 = "sha256-zFz0T/M/CABKkChuiKsFkWj2pphZuFeE5gz0HxZYaz8=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-08-12 12:06:08 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.py \
|
|
|
|
--replace "geographiclib<2,>=1.49" "geographiclib"
|
|
|
|
'';
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
geographiclib
|
|
|
|
];
|
2021-01-15 22:18:51 +00:00
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
async_generator
|
2022-08-12 12:06:08 +00:00
|
|
|
docutils
|
2021-01-15 22:18:51 +00:00
|
|
|
pytestCheckHook
|
2022-08-12 12:06:08 +00:00
|
|
|
pytz
|
2021-01-15 22:18:51 +00:00
|
|
|
];
|
|
|
|
|
2022-08-12 12:06:08 +00:00
|
|
|
disabledTests = [
|
|
|
|
# ignore --skip-tests-requiring-internet flag
|
|
|
|
"test_user_agent_default"
|
|
|
|
];
|
|
|
|
|
|
|
|
pytestFlagsArray = [ "--skip-tests-requiring-internet" ];
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
pythonImportsCheck = [ "geopy" ];
|
|
|
|
|
|
|
|
__darwinAllowLocalNetworking = true;
|
|
|
|
|
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://github.com/geopy/geopy";
|
|
|
|
description = "Python Geocoding Toolbox";
|
2021-01-15 22:18:51 +00:00
|
|
|
changelog = "https://github.com/geopy/geopy/releases/tag/${version}";
|
|
|
|
license = with licenses; [ mit ];
|
|
|
|
maintainers = with maintainers; [ GuillaumeDesforges ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|