1
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs synced 2024-10-19 03:47:13 -04:00
nixpkgs/pkgs/development/python-modules/geopy/default.nix
2022-07-21 22:35:25 +02:00

59 lines
1.2 KiB
Nix

{ lib
, async_generator
, buildPythonPackage
, docutils
, fetchFromGitHub
, geographiclib
, pytestCheckHook
, pythonOlder
, pytz
}:
buildPythonPackage rec {
pname = "geopy";
version = "2.2.0";
disabled = pythonOlder "3.5";
src = fetchFromGitHub {
owner = pname;
repo = pname;
rev = version;
sha256 = "sha256-zFz0T/M/CABKkChuiKsFkWj2pphZuFeE5gz0HxZYaz8=";
};
postPatch = ''
substituteInPlace setup.py \
--replace "geographiclib<2,>=1.49" "geographiclib"
'';
propagatedBuildInputs = [
geographiclib
];
checkInputs = [
async_generator
docutils
pytestCheckHook
pytz
];
disabledTests = [
# ignore --skip-tests-requiring-internet flag
"test_user_agent_default"
];
pytestFlagsArray = [ "--skip-tests-requiring-internet" ];
pythonImportsCheck = [ "geopy" ];
__darwinAllowLocalNetworking = true;
meta = with lib; {
homepage = "https://github.com/geopy/geopy";
description = "Python Geocoding Toolbox";
changelog = "https://github.com/geopy/geopy/releases/tag/${version}";
license = with licenses; [ mit ];
maintainers = with maintainers; [ GuillaumeDesforges ];
};
}