Something went wrong. Try again.
Nix Packages collection & NixOS github.com/NixOS/nixpkgs
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113{ lib, aiounittest, buildPythonPackage, fetchFromGitHub, freezegun, google-api-core, google-auth, google-cloud-core, google-cloud-testutils, grpcio, mock, proto-plus, protobuf, pytest-asyncio, pytestCheckHook, pythonAtLeast, pythonOlder, pyyaml, setuptools, nix-update-script,}:
buildPythonPackage (finalAttrs: { pname = "google-cloud-firestore"; version = "2.34.1"; pyproject = true;
src = fetchFromGitHub { owner = "googleapis"; repo = "google-cloud-python"; tag = "google-cloud-firestore-v${finalAttrs.version}"; hash = "sha256-3mW9h+eIJbSqhWM/AHeGb+AKK2SH+rNXU/JKDmkXlWc="; };
sourceRoot = "${finalAttrs.src.name}/packages/google-cloud-firestore";
build-system = [ setuptools ];
dependencies = [ google-api-core google-auth google-cloud-core grpcio proto-plus protobuf ] ++ google-api-core.optional-dependencies.grpc;
pythonRelaxDeps = [ "protobuf" ];
nativeCheckInputs = [ freezegun google-cloud-testutils mock pytest-asyncio pytestCheckHook pyyaml ] ++ lib.optionals (pythonOlder "3.14") [ aiounittest ];
preCheck = '' # do not shadow imports rm -r google '' + lib.optionalString (pythonAtLeast "3.14") '' # aiounittest is not available for Python 3.14 rm -r tests/unit/v1/test_bulk_writer.py '';
disabledTestPaths = [ # Tests are broken "tests/system/test_system.py" "tests/system/test_system_async.py" # Test requires credentials "tests/system/test_pipeline_acceptance.py" ] ++ lib.optionals (pythonOlder "3.14") [ # RuntimeError: There is no current event loop in thread 'MainThread'. "tests/unit/v1/test_base_client.py::test_baseclient__emulator_channel" "tests/unit/v1/test_bundle.py::TestAsyncBundle::test_async_query" ] ++ lib.optionals (pythonAtLeast "3.14") [ # RuntimeError: There is no current event loop in thread 'MainThread' # due to eliding aiounittest "tests/unit/v1/test_bundle.py::TestAsyncBundle::test_async_query" ];
pythonImportsCheck = [ "google.cloud.firestore_v1" "google.cloud.firestore_admin_v1" ];
passthru = { # bulk updater uses wrong tag skipBulkUpdate = true; updateScript = nix-update-script { extraArgs = [ "--version-regex" "google-cloud-firestore-v(.*)" ]; }; };
meta = { description = "Google Cloud Firestore API client library"; homepage = "https://github.com/googleapis/google-cloud-python/tree/main/packages/google-cloud-firestore"; changelog = "https://github.com/googleapis/google-cloud-python/tree/${finalAttrs.src.tag}/packages/google-cloud-firestore/CHANGELOG.md"; license = lib.licenses.asl20; maintainers = with lib.maintainers; [ sarahec ]; };})