2023-01-11 07:51:40 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, google-api-core
|
|
|
|
, proto-plus
|
|
|
|
, protobuf
|
|
|
|
, pytest-asyncio
|
|
|
|
, pytestCheckHook
|
|
|
|
, pythonOlder
|
|
|
|
}:
|
2020-10-16 20:44:37 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "google-cloud-org-policy";
|
2023-01-11 07:51:40 +00:00
|
|
|
version = "1.5.0";
|
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
2020-10-16 20:44:37 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2023-01-11 07:51:40 +00:00
|
|
|
hash = "sha256-fA8O/pdUNgY3dwj17D7aoHUjzaXpMmL3w0TU6A6gqHo=";
|
2020-10-16 20:44:37 +00:00
|
|
|
};
|
|
|
|
|
2023-01-11 07:51:40 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
google-api-core
|
|
|
|
proto-plus
|
|
|
|
protobuf
|
|
|
|
] ++ google-api-core.optional-dependencies.grpc;
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
pytest-asyncio
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
2020-10-16 20:44:37 +00:00
|
|
|
|
2023-01-11 07:51:40 +00:00
|
|
|
# Prevent google directory from shadowing google imports
|
2021-08-08 23:34:03 +00:00
|
|
|
preCheck = ''
|
|
|
|
rm -r google
|
|
|
|
'';
|
2023-01-11 07:51:40 +00:00
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"google.cloud.orgpolicy"
|
|
|
|
];
|
2020-10-16 20:44:37 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
2023-01-11 07:51:40 +00:00
|
|
|
description = "Protobufs for Google Cloud Organization Policy";
|
2020-10-16 20:44:37 +00:00
|
|
|
homepage = "https://github.com/googleapis/python-org-policy";
|
2023-01-11 07:51:40 +00:00
|
|
|
changelog = "https://github.com/googleapis/python-org-policy/blob/v${version}/CHANGELOG.md";
|
2020-10-16 20:44:37 +00:00
|
|
|
license = licenses.asl20;
|
2021-01-09 10:05:03 +00:00
|
|
|
maintainers = with maintainers; [ austinbutler SuperSandro2000 ];
|
2020-10-16 20:44:37 +00:00
|
|
|
};
|
|
|
|
}
|