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