mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-28 08:33:54 +00:00
57 lines
1.1 KiB
Nix
57 lines
1.1 KiB
Nix
{ lib
|
|
, buildPythonPackage
|
|
, fetchPypi
|
|
, google-api-core
|
|
, google-auth
|
|
, grpcio
|
|
, mock
|
|
, pytestCheckHook
|
|
, pythonOlder
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "google-cloud-core";
|
|
version = "2.3.3";
|
|
format = "setuptools";
|
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
src = fetchPypi {
|
|
inherit pname version;
|
|
hash = "sha256-N7gCc8jX7uGugWs6IK5DWF6lBQbLDmDzz1vl+H8Tc8s=";
|
|
};
|
|
|
|
propagatedBuildInputs = [
|
|
google-auth
|
|
google-api-core
|
|
];
|
|
|
|
passthru.optional-dependencies = {
|
|
grpc = [
|
|
grpcio
|
|
];
|
|
};
|
|
|
|
nativeCheckInputs = [
|
|
mock
|
|
pytestCheckHook
|
|
] ++ passthru.optional-dependencies.grpc;
|
|
|
|
# prevent google directory from shadowing google imports
|
|
preCheck = ''
|
|
rm -r google
|
|
'';
|
|
|
|
pythonImportsCheck = [
|
|
"google.cloud"
|
|
];
|
|
|
|
meta = with lib; {
|
|
description = "API Client library for Google Cloud: Core Helpers";
|
|
homepage = "https://github.com/googleapis/python-cloud-core";
|
|
changelog = "https://github.com/googleapis/python-cloud-core/blob/v${version}/CHANGELOG.md";
|
|
license = licenses.asl20;
|
|
maintainers = with maintainers; [ ];
|
|
};
|
|
}
|