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 ] ++ google-api-core.optional-dependencies.grpc;
39
40 optional-dependencies = {
41 libcst = [ libcst ];
42 };
43
44 nativeCheckInputs = [
45 google-cloud-testutils
46 mock
47 pytestCheckHook
48 pytest-asyncio
49 ];
50
51 preCheck = ''
52 # directory shadows imports
53 rm -r google
54 '';
55
56 disabledTestPaths = [
57 # Requires credentials
58 "tests/system/test_aggregation_query.py"
59 "tests/system/test_allocate_reserve_ids.py"
60 "tests/system/test_query.py"
61 "tests/system/test_put.py"
62 "tests/system/test_read_consistency.py"
63 "tests/system/test_transaction.py"
64 ];
65
66 pythonImportsCheck = [
67 "google.cloud.datastore"
68 "google.cloud.datastore_admin_v1"
69 "google.cloud.datastore_v1"
70 ];
71
72 meta = with lib; {
73 description = "Google Cloud Datastore API client library";
74 homepage = "https://github.com/googleapis/python-datastore";
75 changelog = "https://github.com/googleapis/python-datastore/blob/v${version}/CHANGELOG.md";
76 license = licenses.asl20;
77 maintainers = [ ];
78 };
79}