1{ 2 lib, 3 buildPythonPackage, 4 fetchPypi, 5 google-api-core, 6 google-cloud-core, 7 google-cloud-testutils, 8 libcst, 9 mock, 10 proto-plus, 11 protobuf, 12 pytest-asyncio, 13 pytestCheckHook, 14 pythonOlder, 15 setuptools, 16}: 17 18buildPythonPackage rec { 19 pname = "google-cloud-datastore"; 20 version = "2.21.0"; 21 pyproject = true; 22 23 disabled = pythonOlder "3.7"; 24 25 src = fetchPypi { 26 pname = "google_cloud_datastore"; 27 inherit version; 28 hash = "sha256-7uRU3UpV9bMn+fNEko/xoJpvd8I9Xj2QitMaE8wvQHM="; 29 }; 30 31 build-system = [ setuptools ]; 32 33 dependencies = [ 34 google-api-core 35 google-cloud-core 36 proto-plus 37 protobuf 38 ] 39 ++ google-api-core.optional-dependencies.grpc; 40 41 optional-dependencies = { 42 libcst = [ libcst ]; 43 }; 44 45 nativeCheckInputs = [ 46 google-cloud-testutils 47 mock 48 pytestCheckHook 49 pytest-asyncio 50 ]; 51 52 preCheck = '' 53 # directory shadows imports 54 rm -r google 55 ''; 56 57 disabledTestPaths = [ 58 # Requires credentials 59 "tests/system/test_aggregation_query.py" 60 "tests/system/test_allocate_reserve_ids.py" 61 "tests/system/test_query.py" 62 "tests/system/test_put.py" 63 "tests/system/test_read_consistency.py" 64 "tests/system/test_transaction.py" 65 ]; 66 67 pythonImportsCheck = [ 68 "google.cloud.datastore" 69 "google.cloud.datastore_admin_v1" 70 "google.cloud.datastore_v1" 71 ]; 72 73 meta = with lib; { 74 description = "Google Cloud Datastore API client library"; 75 homepage = "https://github.com/googleapis/python-datastore"; 76 changelog = "https://github.com/googleapis/python-datastore/blob/v${version}/CHANGELOG.md"; 77 license = licenses.asl20; 78 maintainers = [ ]; 79 }; 80}