1{
2 lib,
3 buildPythonPackage,
4 fetchPypi,
5 google-api-core,
6 proto-plus,
7 protobuf,
8 pytest-asyncio,
9 pytestCheckHook,
10 pythonOlder,
11 setuptools,
12}:
13
14buildPythonPackage rec {
15 pname = "google-cloud-org-policy";
16 version = "1.11.0";
17 format = "setuptools";
18
19 disabled = pythonOlder "3.7";
20
21 src = fetchPypi {
22 inherit pname version;
23 hash = "sha256-3BJDTwbIDhscHDR8rcjLQP/JYZrktcW+tcK9WFyV2X8=";
24 };
25
26 build-system = [ setuptools ];
27
28 dependencies = [
29 google-api-core
30 proto-plus
31 protobuf
32 ] ++ google-api-core.optional-dependencies.grpc;
33
34 nativeCheckInputs = [
35 pytest-asyncio
36 pytestCheckHook
37 ];
38
39 # Prevent google directory from shadowing google imports
40 preCheck = ''
41 rm -r google
42 '';
43
44 pythonImportsCheck = [ "google.cloud.orgpolicy" ];
45
46 meta = with lib; {
47 description = "Protobufs for Google Cloud Organization Policy";
48 homepage = "https://github.com/googleapis/python-org-policy";
49 changelog = "https://github.com/googleapis/python-org-policy/blob/v${version}/CHANGELOG.md";
50 license = licenses.asl20;
51 maintainers = with maintainers; [ austinbutler ];
52 };
53}