1{ 2 lib, 3 stdenv, 4 buildPythonPackage, 5 fetchPypi, 6 numpy, 7 python-rapidjson, 8 # optional dependencies 9 aiohttp, 10 geventhttpclient, 11 grpcio, 12 packaging, 13}: 14 15let 16 pname = "tritonclient"; 17 version = "2.54.0"; 18 format = "wheel"; 19in 20buildPythonPackage rec { 21 inherit pname version format; 22 23 src = 24 let 25 platforms = { 26 aarch64-linux = "manylinux2014_aarch64"; 27 x86_64-linux = "manylinux1_x86_64"; 28 }; 29 hashes = { 30 aarch64-linux = "e485a67c75121a2b58456bd6275086252dd72208674b0c85bd57a60f428b686f"; 31 x86_64-linux = "53c326498e9036f99347a938d52abd819743e957223edec31ae3c9681e5a6065"; 32 }; 33 in 34 fetchPypi { 35 inherit pname version format; 36 python = "py3"; 37 dist = "py3"; 38 platform = 39 platforms.${stdenv.hostPlatform.system} 40 or (throw "Unsupported system: ${stdenv.hostPlatform.system}"); 41 sha256 = 42 hashes.${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}"); 43 }; 44 45 propagatedBuildInputs = [ 46 numpy 47 python-rapidjson 48 ]; 49 50 pythonImportsCheck = [ "tritonclient" ]; 51 52 passthru = { 53 optional-dependencies = { 54 http = [ 55 aiohttp 56 geventhttpclient 57 ]; 58 grpc = [ 59 grpcio 60 packaging 61 ]; 62 }; 63 }; 64 65 meta = with lib; { 66 description = "Triton Python client"; 67 homepage = "https://github.com/triton-inference-server/client"; 68 license = licenses.bsd3; 69 maintainers = with maintainers; [ happysalada ]; 70 platforms = platforms.linux; 71 }; 72}