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 ] ++ google-api-core.optional-dependencies.grpc; 50 51 nativeCheckInputs = [ 52 django 53 flask 54 google-cloud-testutils 55 mock 56 pandas 57 pytestCheckHook 58 pytest-asyncio 59 rich 60 ]; 61 62 preCheck = '' 63 # Prevent google directory from shadowing google imports 64 rm -r google 65 ''; 66 67 disabledTests = [ 68 # Test requires credentials 69 "test_write_log_entries" 70 # No need for a second import check 71 "test_namespace_package_compat" 72 ]; 73 74 disabledTestPaths = [ 75 # Tests require credentials 76 "tests/system/test_system.py" 77 "tests/unit/test__gapic.py" 78 # Exclude performance tests 79 "tests/performance/test_performance.py" 80 ]; 81 82 pythonImportsCheck = [ 83 "google.cloud.logging" 84 "google.cloud.logging_v2" 85 ]; 86 87 meta = with lib; { 88 description = "Stackdriver Logging API client library"; 89 homepage = "https://github.com/googleapis/python-logging"; 90 changelog = "https://github.com/googleapis/python-logging/blob/v${version}/CHANGELOG.md"; 91 license = licenses.asl20; 92 maintainers = [ ]; 93 }; 94}