summary refs log tree commit diff
path: root/pkgs/development/python-modules/googlemaps/default.nix
blob: 0bcfe7f80850662e32960228029ab47ad1000b61 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
{ lib
, buildPythonPackage
, fetchFromGitHub
, pytest-cov
, pytestCheckHook
, pythonOlder
, requests
, responses
}:

buildPythonPackage rec {
  pname = "googlemaps";
  version = "4.7.3";
  format = "setuptools";

  disabled = pythonOlder "3.5";

  src = fetchFromGitHub {
    owner = "googlemaps";
    repo = "google-maps-services-python";
    rev = "refs/tags/v${version}";
    hash = "sha256-SwNUoC4x1Z+cqBvuBtDZNZMDcs4XwLj7LWntZ4gZ+vo=";
  };

  propagatedBuildInputs = [
    requests
  ];

  nativeCheckInputs = [
    pytest-cov
    pytestCheckHook
    responses
  ];

  disabledTests = [
    # touches network
    "test_elevation_along_path_single"
    "test_transit_without_time"
  ];

  pythonImportsCheck = [
    "googlemaps"
  ];

  meta = with lib; {
    description = "Python client library for Google Maps API Web Services";
    homepage = "https://github.com/googlemaps/google-maps-services-python";
    changelog = "https://github.com/googlemaps/google-maps-services-python/releases/tag/v${version}";
    license = licenses.asl20;
    maintainers = with maintainers; [ Scriptkiddi ];
  };
}