1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 gitUpdater, 6 google-api-core, 7 grpc-google-iam-v1, 8 mock, 9 proto-plus, 10 protobuf, 11 pytest-asyncio, 12 pytestCheckHook, 13 setuptools, 14}: 15 16buildPythonPackage rec { 17 pname = "google-cloud-kms"; 18 version = "3.4.1"; 19 pyproject = true; 20 21 src = fetchFromGitHub { 22 owner = "googleapis"; 23 repo = "google-cloud-python"; 24 tag = "google-cloud-kms-v${version}"; 25 hash = "sha256-5PzidE1CWN+pt7+gcAtbuXyL/pq6cnn0MCRkBfmeUSw="; 26 }; 27 28 sourceRoot = "${src.name}/packages/google-cloud-kms"; 29 30 build-system = [ setuptools ]; 31 32 dependencies = [ 33 grpc-google-iam-v1 34 google-api-core 35 proto-plus 36 protobuf 37 ] 38 ++ google-api-core.optional-dependencies.grpc; 39 40 nativeCheckInputs = [ 41 mock 42 pytest-asyncio 43 pytestCheckHook 44 ]; 45 46 disabledTests = [ 47 # Disable tests that need credentials 48 "test_list_global_key_rings" 49 # Tests require PROJECT_ID 50 "test_list_ekm_connections" 51 ]; 52 53 pythonImportsCheck = [ 54 "google.cloud.kms" 55 "google.cloud.kms_v1" 56 ]; 57 58 passthru.updateScript = gitUpdater { 59 rev-prefix = "google-cloud-kms-v"; 60 }; 61 62 # picks the wrong tag 63 passthru.skipBulkUpdate = true; 64 65 meta = { 66 description = "Cloud Key Management Service (KMS) API API client library"; 67 homepage = "https://github.com/googleapis/google-cloud-python/tree/main/packages/google-cloud-kms"; 68 changelog = "https://github.com/googleapis/google-cloud-python/blob/${src.tag}/packages/google-cloud-kms/CHANGELOG.md"; 69 license = lib.licenses.asl20; 70 maintainers = [ lib.maintainers.sarahec ]; 71 }; 72}