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.14.0"; 17 pyproject = true; 18 19 disabled = pythonOlder "3.7"; 20 21 src = fetchPypi { 22 pname = "google_cloud_org_policy"; 23 inherit version; 24 hash = "sha256-TId9QgosUStFTmLqzSVXy7x09zTAeZRuMOYfYnkbMZw="; 25 }; 26 27 build-system = [ setuptools ]; 28 29 dependencies = [ 30 google-api-core 31 proto-plus 32 protobuf 33 ] 34 ++ google-api-core.optional-dependencies.grpc; 35 36 nativeCheckInputs = [ 37 pytest-asyncio 38 pytestCheckHook 39 ]; 40 41 # Prevent google directory from shadowing google imports 42 preCheck = '' 43 rm -r google 44 ''; 45 46 pythonImportsCheck = [ "google.cloud.orgpolicy" ]; 47 48 meta = with lib; { 49 description = "Protobufs for Google Cloud Organization Policy"; 50 homepage = "https://github.com/googleapis/python-org-policy"; 51 changelog = "https://github.com/googleapis/python-org-policy/blob/v${version}/CHANGELOG.md"; 52 license = licenses.asl20; 53 maintainers = with maintainers; [ austinbutler ]; 54 }; 55}