nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 buildPythonPackage,
4 fetchPypi,
5 google-api-core,
6 google-cloud-core,
7 google-cloud-testutils,
8 libcst,
9 mock,
10 proto-plus,
11 protobuf,
12 pytest-asyncio,
13 pytestCheckHook,
14 setuptools,
15}:
16
17buildPythonPackage rec {
18 pname = "google-cloud-datastore";
19 version = "2.23.0";
20 pyproject = true;
21
22 src = fetchPypi {
23 pname = "google_cloud_datastore";
24 inherit version;
25 hash = "sha256-gASYg6Suko/cxmG6aAPsJnZl3A5vPOLakUQQeaa7Y4c=";
26 };
27
28 build-system = [ setuptools ];
29
30 dependencies = [
31 google-api-core
32 google-cloud-core
33 proto-plus
34 protobuf
35 ]
36 ++ google-api-core.optional-dependencies.grpc;
37
38 optional-dependencies = {
39 libcst = [ libcst ];
40 };
41
42 nativeCheckInputs = [
43 google-cloud-testutils
44 mock
45 pytestCheckHook
46 pytest-asyncio
47 ];
48
49 preCheck = ''
50 # directory shadows imports
51 rm -r google
52 '';
53
54 disabledTestPaths = [
55 # Requires credentials
56 "tests/system/test_aggregation_query.py"
57 "tests/system/test_allocate_reserve_ids.py"
58 "tests/system/test_query.py"
59 "tests/system/test_put.py"
60 "tests/system/test_read_consistency.py"
61 "tests/system/test_transaction.py"
62 ];
63
64 pythonImportsCheck = [
65 "google.cloud.datastore"
66 "google.cloud.datastore_admin_v1"
67 "google.cloud.datastore_v1"
68 ];
69
70 meta = {
71 description = "Google Cloud Datastore API client library";
72 homepage = "https://github.com/googleapis/python-datastore";
73 changelog = "https://github.com/googleapis/python-datastore/blob/v${version}/CHANGELOG.md";
74 license = lib.licenses.asl20;
75 maintainers = [ ];
76 };
77}