Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ 2 lib, 3 buildPythonPackage, 4 fetchPypi, 5 google-api-core, 6 mock, 7 proto-plus, 8 protobuf, 9 pytest-asyncio, 10 pytestCheckHook, 11 pythonOlder, 12 setuptools, 13}: 14 15buildPythonPackage rec { 16 pname = "google-cloud-vision"; 17 version = "3.7.3"; 18 pyproject = true; 19 20 disabled = pythonOlder "3.7"; 21 22 src = fetchPypi { 23 inherit pname version; 24 hash = "sha256-7kjEjoIMfgmTJmOYaXD+9FbcD0XHr3KdRvHz3ZfB37Y="; 25 }; 26 27 nativeBuildInputs = [ setuptools ]; 28 29 propagatedBuildInputs = [ 30 google-api-core 31 proto-plus 32 protobuf 33 ] ++ google-api-core.optional-dependencies.grpc; 34 35 nativeCheckInputs = [ 36 mock 37 pytestCheckHook 38 pytest-asyncio 39 ]; 40 41 pythonImportsCheck = [ 42 "google.cloud.vision" 43 "google.cloud.vision_helpers" 44 "google.cloud.vision_v1" 45 "google.cloud.vision_v1p1beta1" 46 "google.cloud.vision_v1p2beta1" 47 "google.cloud.vision_v1p3beta1" 48 "google.cloud.vision_v1p4beta1" 49 ]; 50 51 disabledTests = [ 52 # Tests require PROJECT_ID 53 "test_list_products" 54 ]; 55 56 meta = with lib; { 57 description = "Cloud Vision API API client library"; 58 homepage = "https://github.com/googleapis/python-vision"; 59 changelog = "https://github.com/googleapis/python-vision/blob/v${version}/CHANGELOG.md"; 60 license = licenses.asl20; 61 maintainers = [ ]; 62 }; 63}