1{
2 lib,
3 aiounittest,
4 buildPythonPackage,
5 fetchPypi,
6 freezegun,
7 google-api-core,
8 google-cloud-core,
9 google-cloud-testutils,
10 mock,
11 proto-plus,
12 protobuf,
13 pytest-asyncio,
14 pytestCheckHook,
15 pythonOlder,
16 setuptools,
17}:
18
19buildPythonPackage rec {
20 pname = "google-cloud-firestore";
21 version = "2.21.0";
22 pyproject = true;
23
24 disabled = pythonOlder "3.7";
25
26 src = fetchPypi {
27 pname = "google_cloud_firestore";
28 inherit version;
29 hash = "sha256-DDf6qFBil/gn7vw4/rFVJHpty5pUEoljEBXRJfGwA/g=";
30 };
31
32 build-system = [ setuptools ];
33
34 dependencies = [
35 google-api-core
36 google-cloud-core
37 proto-plus
38 protobuf
39 ]
40 ++ google-api-core.optional-dependencies.grpc;
41
42 nativeCheckInputs = [
43 aiounittest
44 freezegun
45 google-cloud-testutils
46 mock
47 pytest-asyncio
48 pytestCheckHook
49 ];
50
51 preCheck = ''
52 # do not shadow imports
53 rm -r google
54 '';
55
56 disabledTestPaths = [
57 # Tests are broken
58 "tests/system/test_system.py"
59 "tests/system/test_system_async.py"
60 # Test requires credentials
61 "tests/unit/v1/test_bulk_writer.py"
62 ];
63
64 disabledTests = [
65 # Test requires credentials
66 "test_collections"
67 ];
68
69 pythonImportsCheck = [
70 "google.cloud.firestore_v1"
71 "google.cloud.firestore_admin_v1"
72 ];
73
74 meta = with lib; {
75 description = "Google Cloud Firestore API client library";
76 homepage = "https://github.com/googleapis/python-firestore";
77 changelog = "https://github.com/googleapis/python-firestore/blob/v${version}/CHANGELOG.md";
78 license = licenses.asl20;
79 maintainers = [ ];
80 };
81}