1{ lib
2, async_generator
3, buildPythonPackage
4, fetchFromGitHub
5, geographiclib
6, isPy3k
7, pytestCheckHook
8}:
9
10buildPythonPackage rec {
11 pname = "geopy";
12 version = "2.2.0";
13 disabled = !isPy3k; # only Python 3
14
15 src = fetchFromGitHub {
16 owner = pname;
17 repo = pname;
18 rev = version;
19 sha256 = "sha256-zFz0T/M/CABKkChuiKsFkWj2pphZuFeE5gz0HxZYaz8=";
20 };
21
22 propagatedBuildInputs = [ geographiclib ];
23
24 checkInputs = [
25 async_generator
26 pytestCheckHook
27 ];
28
29 # Exclude tests which perform API calls
30 pytestFlagsArray = [ "--ignore test/geocoders/" ];
31 pythonImportsCheck = [ "geopy" ];
32
33 __darwinAllowLocalNetworking = true;
34
35 meta = with lib; {
36 homepage = "https://github.com/geopy/geopy";
37 description = "Python Geocoding Toolbox";
38 changelog = "https://github.com/geopy/geopy/releases/tag/${version}";
39 license = with licenses; [ mit ];
40 maintainers = with maintainers; [ GuillaumeDesforges ];
41 };
42}