1{ lib
2, python
3, buildPythonPackage
4, fetchPypi
5, backports_abc
6, backports_ssl_match_hostname
7, certifi
8, singledispatch
9, pythonOlder
10, futures
11}:
12
13buildPythonPackage rec {
14 pname = "tornado";
15 version = "5.1";
16
17
18 propagatedBuildInputs = [ backports_abc certifi singledispatch ]
19 ++ lib.optional (pythonOlder "3.5") backports_ssl_match_hostname
20 ++ lib.optional (pythonOlder "3.2") futures;
21
22 # We specify the name of the test files to prevent
23 # https://github.com/NixOS/nixpkgs/issues/14634
24 checkPhase = ''
25 ${python.interpreter} -m unittest discover *_test.py
26 '';
27
28 src = fetchPypi {
29 inherit pname version;
30 sha256 = "4f66a2172cb947387193ca4c2c3e19131f1c70fa8be470ddbbd9317fd0801582";
31 };
32
33 meta = {
34 description = "A web framework and asynchronous networking library";
35 homepage = http://www.tornadoweb.org/;
36 license = lib.licenses.asl20;
37 };
38}