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}:
16
17buildPythonPackage rec {
18 pname = "google-cloud-datastore";
19 version = "2.19.0";
20 format = "setuptools";
21
22 disabled = pythonOlder "3.7";
23
24 src = fetchPypi {
25 inherit pname version;
26 hash = "sha256-B/xYcKAmHyVGbFV8E035Wpbf0lN6vQiLnVN/ur6ZuXQ=";
27 };
28
29 propagatedBuildInputs = [
30 google-api-core
31 google-cloud-core
32 proto-plus
33 protobuf
34 ] ++ google-api-core.optional-dependencies.grpc;
35
36 passthru.optional-dependencies = {
37 libcst = [ libcst ];
38 };
39
40 nativeCheckInputs = [
41 google-cloud-testutils
42 mock
43 pytestCheckHook
44 pytest-asyncio
45 ];
46
47 preCheck = ''
48 # directory shadows imports
49 rm -r google
50 '';
51
52 disabledTestPaths = [
53 # Requires credentials
54 "tests/system/test_aggregation_query.py"
55 "tests/system/test_allocate_reserve_ids.py"
56 "tests/system/test_query.py"
57 "tests/system/test_put.py"
58 "tests/system/test_read_consistency.py"
59 "tests/system/test_transaction.py"
60 ];
61
62 pythonImportsCheck = [
63 "google.cloud.datastore"
64 "google.cloud.datastore_admin_v1"
65 "google.cloud.datastore_v1"
66 ];
67
68 meta = with lib; {
69 description = "Google Cloud Datastore API client library";
70 homepage = "https://github.com/googleapis/python-datastore";
71 changelog = "https://github.com/googleapis/python-datastore/blob/v${version}/CHANGELOG.md";
72 license = licenses.asl20;
73 maintainers = with maintainers; [ ];
74 };
75}