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