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