1{ 2 lib, 3 buildPythonPackage, 4 fetchFromGitHub, 5 6 # build-system 7 setuptools, 8 9 # dependencies 10 google-api-core, 11 google-cloud-core, 12 google-crc32c, 13 grpc-google-iam-v1, 14 proto-plus, 15 protobuf, 16 17 # optional dependencies 18 libcst, 19 20 # testing 21 grpcio, 22 mock, 23 pytestCheckHook, 24}: 25 26buildPythonPackage rec { 27 pname = "google-cloud-bigtable"; 28 version = "2.30.1"; 29 30 src = fetchFromGitHub { 31 owner = "googleapis"; 32 repo = "python-bigtable"; 33 tag = "v${version}"; 34 hash = "sha256-TciCYpnwfIIvOexp4Ing6grZ7ufFonwP2G26UzlNaJ4="; 35 }; 36 37 pyproject = true; 38 39 build-system = [ setuptools ]; 40 41 dependencies = [ 42 google-api-core 43 google-cloud-core 44 google-crc32c 45 grpc-google-iam-v1 46 proto-plus 47 protobuf 48 ] ++ google-api-core.optional-dependencies.grpc; 49 50 optional-dependencies = { 51 libcst = [ libcst ]; 52 }; 53 54 nativeCheckInputs = [ 55 grpcio 56 mock 57 pytestCheckHook 58 ]; 59 60 checkPhase = '' 61 # Prevent google directory from shadowing google imports 62 rm -r google 63 ''; 64 65 disabledTests = [ "policy" ]; 66 67 pythonImportsCheck = [ 68 "google.cloud.bigtable_admin_v2" 69 "google.cloud.bigtable_v2" 70 "google.cloud.bigtable" 71 ]; 72 73 meta = { 74 description = "Google Cloud Bigtable API client library"; 75 homepage = "https://github.com/googleapis/python-bigtable"; 76 changelog = "https://github.com/googleapis/python-bigtable/blob/v${version}/CHANGELOG.md"; 77 license = lib.licenses.asl20; 78 maintainers = [ lib.maintainers.sarahec ]; 79 }; 80}