1{ lib
2, buildPythonPackage
3, fetchPypi
4, google-auth
5, googleapis-common-protos
6, grpcio
7, grpcio-status
8, protobuf
9, proto-plus
10, requests
11, mock
12, pytest-asyncio
13, pytestCheckHook
14, pythonOlder
15}:
16
17buildPythonPackage rec {
18 pname = "google-api-core";
19 version = "2.10.2";
20 format = "setuptools";
21
22 disabled = pythonOlder "3.6";
23
24 src = fetchPypi {
25 inherit pname version;
26 sha256 = "sha256-EMBvdzn+V3gfh1Izdejho6RnS/Y5LNYTGjIiGCuXEyA=";
27 };
28
29 propagatedBuildInputs = [
30 googleapis-common-protos
31 google-auth
32 grpcio
33 grpcio-status
34 protobuf
35 proto-plus
36 requests
37 ];
38
39 checkInputs = [
40 mock
41 pytest-asyncio
42 pytestCheckHook
43 ];
44
45 # prevent google directory from shadowing google imports
46 preCheck = ''
47 rm -r google
48 '';
49
50 disabledTests = [
51 # Those grpc_helpers tests are failing
52 "test_wrap_unary_errors"
53 "test_wrap_stream_errors_raised"
54 "test_wrap_stream_errors_read"
55 "test_wrap_stream_errors_aiter"
56 "test_wrap_stream_errors_write"
57 "test_wrap_unary_errors"
58 "test___next___w_rpc_error"
59 "test_wrap_stream_errors_invocation"
60 "test_wrap_stream_errors_iterator_initialization"
61 "test_wrap_stream_errors_during_iteration"
62 "test_exception_with_error_code"
63 ];
64
65 pythonImportsCheck = [
66 "google.api_core"
67 ];
68
69 meta = with lib; {
70 description = "Core Library for Google Client Libraries";
71 longDescription = ''
72 This library is not meant to stand-alone. Instead it defines common
73 helpers used by all Google API clients.
74 '';
75 homepage = "https://github.com/googleapis/python-api-core";
76 changelog = "https://github.com/googleapis/python-api-core/blob/v${version}/CHANGELOG.md";
77 license = licenses.asl20;
78 maintainers = with maintainers; [ SuperSandro2000 ];
79 };
80}