1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 setuptools,
6 pytestCheckHook,
7
8 # for passthru.tests
9 distributed,
10 jupyter-server,
11 jupyterlab,
12 matplotlib,
13 mitmproxy,
14 pytest-tornado,
15 pytest-tornasync,
16 pyzmq,
17 sockjs-tornado,
18 urllib3,
19}:
20
21buildPythonPackage rec {
22 pname = "tornado";
23 version = "6.5.1";
24 pyproject = true;
25
26 src = fetchFromGitHub {
27 owner = "tornadoweb";
28 repo = "tornado";
29 tag = "v${version}";
30 hash = "sha256-CtmIjPKxKC0T8PGQW1wIAJm/+XxMzZXVZyZxV56sZME=";
31 };
32
33 build-system = [ setuptools ];
34
35 nativeCheckInputs = [ pytestCheckHook ];
36
37 disabledTestPaths = [
38 # additional tests that have extra dependencies, run slowly, or produce more output than a simple pass/fail
39 # https://github.com/tornadoweb/tornado/blob/v6.2.0/maint/test/README
40 "maint/test"
41
42 # AttributeError: 'TestIOStreamWebMixin' object has no attribute 'io_loop'
43 "tornado/test/iostream_test.py"
44 ];
45
46 disabledTests = [
47 # Exception: did not get expected log message
48 "test_unix_socket_bad_request"
49 ];
50
51 pythonImportsCheck = [ "tornado" ];
52
53 __darwinAllowLocalNetworking = true;
54
55 passthru.tests = {
56 inherit
57 distributed
58 jupyter-server
59 jupyterlab
60 matplotlib
61 mitmproxy
62 pytest-tornado
63 pytest-tornasync
64 pyzmq
65 sockjs-tornado
66 urllib3
67 ;
68 };
69
70 meta = with lib; {
71 description = "Web framework and asynchronous networking library";
72 homepage = "https://www.tornadoweb.org/";
73 license = licenses.asl20;
74 maintainers = [ ];
75 };
76}