Merge pull request #307098 from r-ryantm/auto-update/cilium-cli
[NixPkgs.git] / pkgs / development / python-modules / google-cloud-spanner / default.nix
blobc8c055555d3f57d0f1034c49e08345a3b54d18cd
1 { lib
2 , buildPythonPackage
3 , deprecated
4 , fetchPypi
5 , google-api-core
6 , google-cloud-core
7 , google-cloud-testutils
8 , grpc-google-iam-v1
9 , grpc-interceptor
10 , libcst
11 , mock
12 , proto-plus
13 , protobuf
14 , pytest-asyncio
15 , pytestCheckHook
16 , pythonOlder
17 , sqlparse
18 , setuptools
21 buildPythonPackage rec {
22   pname = "google-cloud-spanner";
23   version = "3.44.0";
24   pyproject = true;
26   disabled = pythonOlder "3.7";
28   src = fetchPypi {
29     inherit pname version;
30     hash = "sha256-NTzAsG/UVn2BxPwUxE/ZnXqkCA9LwhmDRoq3LdstLIo=";
31   };
33   nativeBuildInputs = [
34     setuptools
35   ];
37   propagatedBuildInputs = [
38     deprecated
39     google-api-core
40     google-cloud-core
41     grpc-google-iam-v1
42     grpc-interceptor
43     proto-plus
44     protobuf
45     sqlparse
46   ] ++ google-api-core.optional-dependencies.grpc;
48   passthru.optional-dependencies = {
49     libcst = [
50       libcst
51     ];
52   };
54   nativeCheckInputs = [
55     google-cloud-testutils
56     mock
57     pytest-asyncio
58     pytestCheckHook
59   ];
61   preCheck = ''
62     # prevent google directory from shadowing google imports
63     rm -r google
64   '';
66   disabledTestPaths = [
67     # Requires credentials
68     "tests/system/test_backup_api.py"
69     "tests/system/test_database_api.py"
70     "tests/system/test_dbapi.py"
71     "tests/system/test_instance_api.py"
72     "tests/system/test_session_api.py"
73     "tests/system/test_streaming_chunking.py"
74     "tests/system/test_table_api.py"
75     "tests/unit/spanner_dbapi/test_connect.py"
76     "tests/unit/spanner_dbapi/test_connection.py"
77     "tests/unit/spanner_dbapi/test_cursor.py"
78   ];
80   pythonImportsCheck = [
81     "google.cloud.spanner_admin_database_v1"
82     "google.cloud.spanner_admin_instance_v1"
83     "google.cloud.spanner_dbapi"
84     "google.cloud.spanner_v1"
85   ];
87   meta = with lib; {
88     description = "Cloud Spanner API client library";
89     homepage = "https://github.com/googleapis/python-spanner";
90     changelog = "https://github.com/googleapis/python-spanner/blob/v${version}/CHANGELOG.md";
91     license = licenses.asl20;
92     maintainers = with maintainers; [ ];
93   };