2019-07-31 22:31:10 +01:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
2021-05-07 19:25:29 +01:00
|
|
|
, pythonAtLeast
|
|
|
|
, fetchFromGitHub
|
|
|
|
, colorcet
|
|
|
|
, cryptography
|
2019-07-31 22:31:10 +01:00
|
|
|
, flask
|
2020-01-19 13:14:23 +00:00
|
|
|
, flask-compress
|
2019-07-31 22:31:10 +01:00
|
|
|
, flask-cors
|
2020-01-19 13:14:23 +00:00
|
|
|
, flask-sockets
|
2021-05-07 19:25:29 +01:00
|
|
|
, gevent
|
2020-09-15 19:24:21 +01:00
|
|
|
, imageio
|
2019-07-31 22:31:10 +01:00
|
|
|
, numpy
|
|
|
|
, pillow
|
2021-05-07 19:25:29 +01:00
|
|
|
, pyopenssl
|
|
|
|
, scipy
|
2019-07-31 22:31:10 +01:00
|
|
|
, six
|
2020-01-19 13:14:23 +00:00
|
|
|
, unidecode
|
|
|
|
, urllib3
|
2021-05-07 19:25:29 +01:00
|
|
|
, wget
|
|
|
|
, deepdiff
|
|
|
|
, pytestCheckHook
|
|
|
|
, pytestcov
|
|
|
|
, websocket_client
|
2019-07-31 22:31:10 +01:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "runway-python";
|
2020-12-25 16:24:35 +00:00
|
|
|
version = "0.6.1";
|
2019-07-31 22:31:10 +01:00
|
|
|
|
2021-05-07 19:25:29 +01:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "runwayml";
|
|
|
|
repo = "model-sdk";
|
|
|
|
rev = version;
|
|
|
|
sha256 = "1ww2wai1qnly8i7g42vhkkbs4yp7wi9x4fjdxsg9fl3izjra0zs2";
|
2019-07-31 22:31:10 +01:00
|
|
|
};
|
|
|
|
|
2020-09-15 19:24:21 +01:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
colorcet
|
2021-05-07 19:25:29 +01:00
|
|
|
cryptography
|
2020-09-15 19:24:21 +01:00
|
|
|
flask
|
|
|
|
flask-compress
|
|
|
|
flask-cors
|
|
|
|
flask-sockets
|
|
|
|
gevent
|
|
|
|
imageio
|
|
|
|
numpy
|
|
|
|
pillow
|
2021-05-07 19:25:29 +01:00
|
|
|
pyopenssl
|
2020-09-15 19:24:21 +01:00
|
|
|
scipy
|
|
|
|
six
|
|
|
|
unidecode
|
|
|
|
urllib3
|
|
|
|
wget
|
|
|
|
];
|
2019-07-31 22:31:10 +01:00
|
|
|
|
2020-01-19 13:14:23 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"runway"
|
|
|
|
];
|
|
|
|
|
2021-05-07 19:25:29 +01:00
|
|
|
checkInputs = [
|
|
|
|
deepdiff
|
|
|
|
pytestCheckHook
|
|
|
|
pytestcov
|
|
|
|
websocket_client
|
|
|
|
];
|
|
|
|
|
|
|
|
disabledTests = [
|
|
|
|
# these tests require network
|
|
|
|
"test_file_deserialization_remote"
|
|
|
|
"test_file_deserialization_absolute_directory"
|
|
|
|
"test_file_deserialization_remote_directory"
|
|
|
|
] ++ lib.optionals (pythonAtLeast "3.9") [
|
|
|
|
# AttributeError: module 'base64' has no attribute 'decodestring
|
|
|
|
# https://github.com/runwayml/model-sdk/issues/99
|
|
|
|
"test_image_serialize_and_deserialize"
|
|
|
|
"test_segmentation_serialize_and_deserialize_colormap"
|
|
|
|
"test_segmentation_serialize_and_deserialize_labelmap"
|
|
|
|
];
|
|
|
|
|
2019-07-31 22:31:10 +01:00
|
|
|
meta = {
|
|
|
|
description = "Helper library for creating Runway models";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://github.com/runwayml/model-sdk";
|
2019-07-31 22:31:10 +01:00
|
|
|
license = with lib.licenses; [ mit ];
|
|
|
|
maintainers = with lib.maintainers; [ prusnak ];
|
|
|
|
};
|
|
|
|
}
|