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 = platforms.${stdenv.hostPlatform.system} or { }; 39 sha256 = hashes.${stdenv.hostPlatform.system} or { }; 40 }; 41 42 propagatedBuildInputs = [ 43 numpy 44 python-rapidjson 45 ]; 46 47 pythonImportsCheck = [ "tritonclient" ]; 48 49 passthru = { 50 optional-dependencies = { 51 http = [ 52 aiohttp 53 geventhttpclient 54 ]; 55 grpc = [ 56 grpcio 57 packaging 58 ]; 59 }; 60 }; 61 62 meta = with lib; { 63 description = "Triton Python client"; 64 homepage = "https://github.com/triton-inference-server/client"; 65 license = licenses.bsd3; 66 maintainers = with maintainers; [ happysalada ]; 67 platforms = platforms.linux; 68 }; 69}