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