git.iko.soy/typeable/nixpkgs
on master help sign in
python3Packages.runway-python: fix build, enable tests
commit12493f272b466473c59f1f42a8e2c8df55e99158 authorMartin Weinelt <hexa@darmstadt.ccc.de> dateFri 7 May 2021, 20:25 (6 years ago) parent5ae9027
1 file changed+39−11
pkgs/development/python-modules/runway-python/default.nix+39−11
pkgs/development/python-modules/runway-python/default.nix+39−11
@@ -1,33 +1,43 @@
11{ lib
22, buildPythonPackage
3−, fetchPypi
3+, pythonAtLeast
4+, fetchFromGitHub
5+, colorcet
6+, cryptography
47, flask
58, flask-compress
69, flask-cors
710, flask-sockets
11+, gevent
812, imageio
913, numpy
10−, scipy
1114, pillow
12−, gevent
13−, wget
15+, pyopenssl
16+, scipy
1417, six
15−, colorcet
1618, unidecode
1719, urllib3
20+, wget
21+, deepdiff
22+, pytestCheckHook
23+, pytestcov
24+, websocket_client
1825}:
1926
2027buildPythonPackage rec {
2128 pname = "runway-python";
2229 version = "0.6.1";
2330
24− src = fetchPypi {
25− inherit pname version;
26− sha256 = "66cf1517dd817bf6db3792608920274f964dd0ced8dabecd925b8bc17aa95740";
31+ src = fetchFromGitHub {
32+ owner = "runwayml";
33+ repo = "model-sdk";
34+ rev = version;
35+ sha256 = "1ww2wai1qnly8i7g42vhkkbs4yp7wi9x4fjdxsg9fl3izjra0zs2";
2736 };
2837
2938 propagatedBuildInputs = [
3039 colorcet
40+ cryptography
3141 flask
3242 flask-compress
3343 flask-cors
@@ -36,6 +46,7 @@ buildPythonPackage rec {
3646 imageio
3747 numpy
3848 pillow
49+ pyopenssl
3950 scipy
4051 six
4152 unidecode
@@ -43,13 +54,30 @@ buildPythonPackage rec {
4354 wget
4455 ];
4556
46− # tests are not packaged in the released tarball
47− doCheck = false;
48−
4957 pythonImportsCheck = [
5058 "runway"
5159 ];
5260
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+
5381 meta = {
5482 description = "Helper library for creating Runway models";
5583 homepage = "https://github.com/runwayml/model-sdk";