1{ lib 2, buildPythonPackage 3, fetchPypi 4, google-api-core 5, google-cloud-core 6, google-cloud-testutils 7, grpc-google-iam-v1 8, libcst 9, mock 10, proto-plus 11, protobuf 12, pytest-asyncio 13, pytestCheckHook 14, pythonOlder 15, sqlparse 16}: 17 18buildPythonPackage rec { 19 pname = "google-cloud-spanner"; 20 version = "3.40.1"; 21 format = "setuptools"; 22 23 disabled = pythonOlder "3.7"; 24 25 src = fetchPypi { 26 inherit pname version; 27 hash = "sha256-YWsHyGza5seLrSe4qznYznonNRHyuR/iYPFw2SZlPC4="; 28 }; 29 30 propagatedBuildInputs = [ 31 google-api-core 32 google-cloud-core 33 grpc-google-iam-v1 34 proto-plus 35 protobuf 36 sqlparse 37 ] ++ google-api-core.optional-dependencies.grpc; 38 39 passthru.optional-dependencies = { 40 libcst = [ 41 libcst 42 ]; 43 }; 44 45 nativeCheckInputs = [ 46 google-cloud-testutils 47 mock 48 pytest-asyncio 49 pytestCheckHook 50 ]; 51 52 preCheck = '' 53 # prevent google directory from shadowing google imports 54 rm -r google 55 ''; 56 57 disabledTestPaths = [ 58 # Requires credentials 59 "tests/system/test_backup_api.py" 60 "tests/system/test_database_api.py" 61 "tests/system/test_dbapi.py" 62 "tests/system/test_instance_api.py" 63 "tests/system/test_session_api.py" 64 "tests/system/test_streaming_chunking.py" 65 "tests/system/test_table_api.py" 66 "tests/unit/spanner_dbapi/test_connect.py" 67 "tests/unit/spanner_dbapi/test_connection.py" 68 "tests/unit/spanner_dbapi/test_cursor.py" 69 ]; 70 71 pythonImportsCheck = [ 72 "google.cloud.spanner_admin_database_v1" 73 "google.cloud.spanner_admin_instance_v1" 74 "google.cloud.spanner_dbapi" 75 "google.cloud.spanner_v1" 76 ]; 77 78 meta = with lib; { 79 description = "Cloud Spanner API client library"; 80 homepage = "https://github.com/googleapis/python-spanner"; 81 changelog = "https://github.com/googleapis/python-spanner/blob/v${version}/CHANGELOG.md"; 82 license = licenses.asl20; 83 maintainers = with maintainers; [ ]; 84 }; 85}