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