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