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, pytestcov
24, websocket_client
25}:
26
27buildPythonPackage rec {
28 pname = "runway-python";
29 version = "0.6.1";
30
31 src = fetchFromGitHub {
32 owner = "runwayml";
33 repo = "model-sdk";
34 rev = version;
35 sha256 = "1ww2wai1qnly8i7g42vhkkbs4yp7wi9x4fjdxsg9fl3izjra0zs2";
36 };
37
38 propagatedBuildInputs = [
39 colorcet
40 cryptography
41 flask
42 flask-compress
43 flask-cors
44 flask-sockets
45 gevent
46 imageio
47 numpy
48 pillow
49 pyopenssl
50 scipy
51 six
52 unidecode
53 urllib3
54 wget
55 ];
56
57 pythonImportsCheck = [
58 "runway"
59 ];
60
61 checkInputs = [
62 deepdiff
63 pytestCheckHook
64 pytestcov
65 websocket_client
66 ];
67
68 disabledTests = [
69 # these tests require network
70 "test_file_deserialization_remote"
71 "test_file_deserialization_absolute_directory"
72 "test_file_deserialization_remote_directory"
73 ] ++ lib.optionals (pythonAtLeast "3.9") [
74 # AttributeError: module 'base64' has no attribute 'decodestring
75 # https://github.com/runwayml/model-sdk/issues/99
76 "test_image_serialize_and_deserialize"
77 "test_segmentation_serialize_and_deserialize_colormap"
78 "test_segmentation_serialize_and_deserialize_labelmap"
79 ];
80
81 meta = {
82 description = "Helper library for creating Runway models";
83 homepage = "https://github.com/runwayml/model-sdk";
84 license = with lib.licenses; [ mit ];
85 maintainers = with lib.maintainers; [ prusnak ];
86 };
87}