Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at 20.09-beta 78 lines 1.9 kB view raw
1{ lib, stdenv, fetchPypi, buildPythonPackage, isPy3k 2, jaraco_text 3, more-itertools 4, portend 5, pyopenssl 6, pytestCheckHook 7, pytestcov 8, pytest-mock 9, pytest-testmon 10, requests 11, requests-toolbelt 12, requests-unixsocket 13, setuptools_scm 14, setuptools-scm-git-archive 15, six 16, trustme 17}: 18 19buildPythonPackage rec { 20 pname = "cheroot"; 21 version = "8.4.5"; 22 23 disabled = !isPy3k; 24 25 src = fetchPypi { 26 inherit pname version; 27 sha256 = "b6c18caf5f79cdae668c35fc8309fc88ea4a964cce9e2ca8504fab13bcf57301"; 28 }; 29 30 nativeBuildInputs = [ setuptools_scm setuptools-scm-git-archive ]; 31 32 propagatedBuildInputs = [ more-itertools six ]; 33 34 checkInputs = [ 35 jaraco_text 36 portend 37 pyopenssl 38 pytestCheckHook 39 pytestcov 40 pytest-mock 41 pytest-testmon 42 requests 43 requests-toolbelt 44 requests-unixsocket 45 trustme 46 ]; 47 48 # avoid attempting to use 3 packages not available on nixpkgs 49 # (jaraco.apt, jaraco.context, yg.lockfile) 50 pytestFlagsArray = [ "--ignore=cheroot/test/test_wsgi.py" ]; 51 52 # Disable doctest plugin because times out 53 # Disable xdist (-n arg) because it's incompatible with testmon 54 # Deselect test_bind_addr_unix on darwin because times out 55 # Deselect test_http_over_https_error on darwin because builtin cert fails 56 # Disable warnings-as-errors because of deprecation warnings from socks on python 3.7 57 # adds many other pytest utilities which aren't necessary like linting 58 preCheck = '' 59 rm pytest.ini 60 ''; 61 62 disabledTests= [ 63 "tls" # touches network 64 "peercreds_unix_sock" # test urls no longer allowed 65 ] ++ lib.optionals stdenv.isDarwin [ 66 "http_over_https_error" 67 "bind_addr_unix" 68 ]; 69 70 # Some of the tests use localhost networking. 71 __darwinAllowLocalNetworking = true; 72 73 meta = with lib; { 74 description = "High-performance, pure-Python HTTP"; 75 homepage = "https://github.com/cherrypy/cheroot"; 76 license = licenses.mit; 77 }; 78}