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.32.0"; 29 30 src = fetchFromGitHub { 31 owner = "googleapis"; 32 repo = "python-bigtable"; 33 tag = "v${version}"; 34 hash = "sha256-9yU0xNh5GuVbQuAmoFEHJBmHCVvFOOxEw+b/3B9O1OY="; 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 ] 49 ++ google-api-core.optional-dependencies.grpc; 50 51 optional-dependencies = { 52 libcst = [ libcst ]; 53 }; 54 55 nativeCheckInputs = [ 56 grpcio 57 mock 58 pytestCheckHook 59 ]; 60 61 checkPhase = '' 62 # Prevent google directory from shadowing google imports 63 rm -r google 64 ''; 65 66 disabledTests = [ "policy" ]; 67 68 pythonImportsCheck = [ 69 "google.cloud.bigtable_admin_v2" 70 "google.cloud.bigtable_v2" 71 "google.cloud.bigtable" 72 ]; 73 74 meta = { 75 description = "Google Cloud Bigtable API client library"; 76 homepage = "https://github.com/googleapis/python-bigtable"; 77 changelog = "https://github.com/googleapis/python-bigtable/blob/${src.tag}/CHANGELOG.md"; 78 license = lib.licenses.asl20; 79 maintainers = [ lib.maintainers.sarahec ]; 80 }; 81}