pythonPackages.google_cloud_spanner: 2.0.0 -> 2.1.0

This commit is contained in:
Sandro Jäckel 2021-01-05 15:29:11 +01:00
parent a40a35d8da
commit 93085779d9
No known key found for this signature in database
GPG Key ID: 3AF5A43A3EECC2E5

View File

@ -1,33 +1,54 @@
{ stdenv, buildPythonPackage, fetchPypi, pytestCheckHook, pythonOlder
, grpc_google_iam_v1, grpcio-gcp, google_api_core, google_cloud_core
, google_cloud_testutils, mock, pytest }:
{ stdenv
, buildPythonPackage
, fetchPypi
, grpc_google_iam_v1
, google_cloud_core
, google_cloud_testutils
, libcst
, mock
, proto-plus
, pytestCheckHook
, pytest-asyncio
, sqlparse
}:
buildPythonPackage rec {
pname = "google-cloud-spanner";
version = "2.0.0";
version = "2.1.0";
src = fetchPypi {
inherit pname version;
sha256 = "edac9d86ea2d8e87c048423f610cd3e5dbb6f9db7f1f9353ff133014689e97c6";
sha256 = "0mkkx6l3cbwfwng12zpisbv6m919fkhdb48xk24ayc19193bi86n";
};
disabled = pythonOlder "3.5";
checkInputs = [ google_cloud_testutils mock pytestCheckHook ];
propagatedBuildInputs =
[ grpcio-gcp grpc_google_iam_v1 google_api_core google_cloud_core ];
# prevent google directory from shadowing google imports
# remove tests that require credentials
preCheck = ''
rm -r google
rm tests/system/test_system.py
postPatch = ''
substituteInPlace setup.py \
--replace '"proto-plus == 1.11.0"' '"proto-plus"'
'';
propagatedBuildInputs = [ google_cloud_core grpc_google_iam_v1 libcst proto-plus sqlparse ];
checkInputs = [ google_cloud_testutils mock pytestCheckHook pytest-asyncio ];
preCheck = ''
# prevent google directory from shadowing google imports
rm -r google
# disable tests which require credentials
rm tests/system/test_{system,system_dbapi}.py
rm tests/unit/spanner_dbapi/test_{connect,connection,cursor}.py
'';
pythonImportsCheck = [
"google.cloud.spanner_admin_database_v1"
"google.cloud.spanner_admin_instance_v1"
"google.cloud.spanner_dbapi"
"google.cloud.spanner_v1"
];
meta = with stdenv.lib; {
description = "Cloud Spanner API client library";
homepage = "https://pypi.org/project/google-cloud-spanner";
homepage = "https://github.com/googleapis/python-spanner";
license = licenses.asl20;
maintainers = [ maintainers.costrouc ];
maintainers = with maintainers; [ SuperSandro2000 ];
};
}