1{ lib 2, buildPythonPackage 3, pythonAtLeast 4, fetchFromGitHub 5, colorcet 6, cryptography 7, flask 8, flask-compress 9, flask-cors 10, flask-sockets 11, gevent 12, imageio 13, numpy 14, pillow 15, pyopenssl 16, scipy 17, six 18, unidecode 19, urllib3 20, wget 21, deepdiff 22, pytestCheckHook 23, pytest-cov 24, pythonOlder 25, websocket-client 26}: 27 28buildPythonPackage rec { 29 pname = "runway-python"; 30 version = "0.6.1"; 31 disabled = pythonOlder "3.6"; 32 33 src = fetchFromGitHub { 34 owner = "runwayml"; 35 repo = "model-sdk"; 36 rev = version; 37 sha256 = "1ww2wai1qnly8i7g42vhkkbs4yp7wi9x4fjdxsg9fl3izjra0zs2"; 38 }; 39 40 propagatedBuildInputs = [ 41 colorcet 42 cryptography 43 flask 44 flask-compress 45 flask-cors 46 flask-sockets 47 gevent 48 imageio 49 numpy 50 pillow 51 pyopenssl 52 scipy 53 six 54 unidecode 55 urllib3 56 wget 57 ]; 58 59 pythonImportsCheck = [ 60 "runway" 61 ]; 62 63 checkInputs = [ 64 deepdiff 65 pytestCheckHook 66 pytest-cov 67 websocket-client 68 ]; 69 70 disabledTests = [ 71 # these tests require network 72 "test_file_deserialization_remote" 73 "test_file_deserialization_absolute_directory" 74 "test_file_deserialization_remote_directory" 75 # Fails with a decoding error at the moment 76 "test_inference_async" 77 ] ++ lib.optionals (pythonAtLeast "3.9") [ 78 # AttributeError: module 'base64' has no attribute 'decodestring 79 # https://github.com/runwayml/model-sdk/issues/99 80 "test_image_serialize_and_deserialize" 81 "test_segmentation_serialize_and_deserialize_colormap" 82 "test_segmentation_serialize_and_deserialize_labelmap" 83 ]; 84 85 meta = { 86 description = "Helper library for creating Runway models"; 87 homepage = "https://github.com/runwayml/model-sdk"; 88 license = with lib.licenses; [ mit ]; 89 maintainers = with lib.maintainers; [ prusnak ]; 90 }; 91}