1{ lib 2, buildPythonPackage 3, fetchPypi 4, grpc-google-iam-v1 5, google-cloud-core 6, google-cloud-testutils 7, libcst 8, mock 9, proto-plus 10, pytestCheckHook 11, pytest-asyncio 12, sqlparse 13}: 14 15buildPythonPackage rec { 16 pname = "google-cloud-spanner"; 17 version = "3.11.1"; 18 19 src = fetchPypi { 20 inherit pname version; 21 sha256 = "b993b4c68f11dd6fe0f66e0c437a71f9bed8d77f6bf1ddc4aad422ce3b330ecb"; 22 }; 23 24 propagatedBuildInputs = [ 25 google-cloud-core 26 grpc-google-iam-v1 27 libcst 28 proto-plus 29 sqlparse 30 ]; 31 32 checkInputs = [ 33 google-cloud-testutils 34 mock 35 pytestCheckHook 36 pytest-asyncio 37 ]; 38 39 preCheck = '' 40 # prevent google directory from shadowing google imports 41 rm -r google 42 ''; 43 44 disabledTestPaths = [ 45 # Requires credentials 46 "tests/system/test_backup_api.py" 47 "tests/system/test_database_api.py" 48 "tests/system/test_dbapi.py" 49 "tests/system/test_instance_api.py" 50 "tests/system/test_session_api.py" 51 "tests/system/test_streaming_chunking.py" 52 "tests/system/test_table_api.py" 53 "tests/unit/spanner_dbapi/test_connect.py" 54 "tests/unit/spanner_dbapi/test_connection.py" 55 "tests/unit/spanner_dbapi/test_cursor.py" 56 ]; 57 58 pythonImportsCheck = [ 59 "google.cloud.spanner_admin_database_v1" 60 "google.cloud.spanner_admin_instance_v1" 61 "google.cloud.spanner_dbapi" 62 "google.cloud.spanner_v1" 63 ]; 64 65 meta = with lib; { 66 description = "Cloud Spanner API client library"; 67 homepage = "https://github.com/googleapis/python-spanner"; 68 license = licenses.asl20; 69 maintainers = with maintainers; [ SuperSandro2000 ]; 70 }; 71}