about summary refs log tree commit diff
path: root/pkgs/development/python-modules/google_gax/default.nix
blob: daabba6c390a10ad952b405f81155dd66dcb699b (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
{ stdenv, buildPythonPackage, fetchPypi
, google_auth, ply, protobuf, grpcio, requests
, googleapis_common_protos, dill, future, pytest, mock, unittest2 }:

buildPythonPackage rec {
  pname = "google-gax";
  version = "0.16.0";

  src = fetchPypi {
    inherit pname version;
    sha256 = "1d844c56f942d98f12a1b0ecabe8a17d69bef41ff513edd97253bcde02ffd929";
  };

  propagatedBuildInputs = [ google_auth ply protobuf grpcio requests googleapis_common_protos dill future ];
  checkInputs = [ pytest mock unittest2 ];

  # Importing test__grpc_google_auth fails with "ModuleNotFoundError: No module named 'google_auth_httplib2'", where
  # that file would be is unclear to me so I just remove the test.
  postPatch = ''rm tests/test__grpc_google_auth.py'';

  checkPhase = ''
    py.test
  '';

  meta = with stdenv.lib; {
    description = "Google API Extensions for Python (gax-python) tools based on gRPC and Google API conventions.";
    homepage = "http://gax-python.readthedocs.io/en/latest/";
    license = licenses.bsd3;
    maintainers = with maintainers; [ vanschelven ];
  };
}