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