2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
docutils,
|
|
|
|
fetchFromGitHub,
|
|
|
|
geographiclib,
|
|
|
|
pytestCheckHook,
|
|
|
|
pythonAtLeast,
|
|
|
|
pythonOlder,
|
|
|
|
pytz,
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
2021-01-15 22:18:51 +00:00
|
|
|
pname = "geopy";
|
2024-01-02 11:29:13 +00:00
|
|
|
version = "2.4.1";
|
2022-11-21 17:40:18 +00:00
|
|
|
format = "setuptools";
|
|
|
|
disabled = pythonOlder "3.7";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2021-01-15 22:18:51 +00:00
|
|
|
owner = pname;
|
|
|
|
repo = pname;
|
2022-11-21 17:40:18 +00:00
|
|
|
rev = "refs/tags/${version}";
|
2024-01-02 11:29:13 +00:00
|
|
|
hash = "sha256-mlOXDEtYry1IUAZWrP2FuY/CGliUnCPYLULnLNN0n4Y=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
propagatedBuildInputs = [ geographiclib ];
|
2021-01-15 22:18:51 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
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"
|
|
|
|
];
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
disabledTestPaths = lib.optionals (pythonAtLeast "3.12") [ "test/test_init.py" ];
|
2024-01-13 08:15:51 +00:00
|
|
|
|
2022-08-12 12:06:08 +00:00
|
|
|
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
|
|
|
};
|
|
|
|
}
|