1{
2 lib,
3 buildPythonPackage,
4 django,
5 fetchPypi,
6 flask,
7 google-api-core,
8 google-cloud-appengine-logging,
9 google-cloud-audit-log,
10 google-cloud-core,
11 google-cloud-testutils,
12 grpc-google-iam-v1,
13 mock,
14 opentelemetry-api,
15 pandas,
16 proto-plus,
17 protobuf,
18 pytest-asyncio,
19 pytestCheckHook,
20 pythonOlder,
21 rich,
22 setuptools,
23}:
24
25buildPythonPackage rec {
26 pname = "google-cloud-logging";
27 version = "3.12.1";
28 pyproject = true;
29
30 disabled = pythonOlder "3.7";
31
32 src = fetchPypi {
33 pname = "google_cloud_logging";
34 inherit version;
35 hash = "sha256-Nu/II5hQVbIDkE6D4cj5+ZmzxkJwvNo51XOGyk7/1ng=";
36 };
37
38 build-system = [ setuptools ];
39
40 dependencies = [
41 google-api-core
42 google-cloud-appengine-logging
43 google-cloud-audit-log
44 google-cloud-core
45 grpc-google-iam-v1
46 opentelemetry-api
47 proto-plus
48 protobuf
49 ]
50 ++ google-api-core.optional-dependencies.grpc;
51
52 nativeCheckInputs = [
53 django
54 flask
55 google-cloud-testutils
56 mock
57 pandas
58 pytestCheckHook
59 pytest-asyncio
60 rich
61 ];
62
63 preCheck = ''
64 # Prevent google directory from shadowing google imports
65 rm -r google
66 '';
67
68 disabledTests = [
69 # Test requires credentials
70 "test_write_log_entries"
71 # No need for a second import check
72 "test_namespace_package_compat"
73 ];
74
75 disabledTestPaths = [
76 # Tests require credentials
77 "tests/system/test_system.py"
78 "tests/unit/test__gapic.py"
79 # Exclude performance tests
80 "tests/performance/test_performance.py"
81 ];
82
83 pythonImportsCheck = [
84 "google.cloud.logging"
85 "google.cloud.logging_v2"
86 ];
87
88 meta = with lib; {
89 description = "Stackdriver Logging API client library";
90 homepage = "https://github.com/googleapis/python-logging";
91 changelog = "https://github.com/googleapis/python-logging/blob/v${version}/CHANGELOG.md";
92 license = licenses.asl20;
93 maintainers = [ ];
94 };
95}