Merge pull request #137280 from SuperSandro2000/eventlet

authored by

Sandro and committed by
GitHub
2cbbea18 c995e9f2

+19 -7
+19 -7
pkgs/development/python-modules/eventlet/default.nix
··· 8 8 , monotonic 9 9 , six 10 10 , nose 11 + , pyopenssl 12 + , iana-etc 13 + , libredirect 11 14 }: 12 15 13 16 buildPythonPackage rec { ··· 22 25 propagatedBuildInputs = [ dnspython greenlet monotonic six ] 23 26 ++ lib.optional (pythonOlder "3.4") enum34; 24 27 25 - prePatch = '' 26 - substituteInPlace setup.py \ 27 - --replace "dnspython >= 1.15.0, < 2.0.0" "dnspython" 28 + checkInputs = [ nose pyopenssl ]; 29 + 30 + preCheck = '' 31 + echo "nameserver 127.0.0.1" > resolv.conf 32 + export NIX_REDIRECTS=/etc/protocols=${iana-etc}/etc/protocols:/etc/resolv.conf=$(realpath resolv.conf) 33 + export LD_PRELOAD=${libredirect}/lib/libredirect.so 34 + 35 + export EVENTLET_IMPORT_VERSION_ONLY=0 28 36 ''; 29 37 30 - checkInputs = [ nose ]; 38 + checkPhase = '' 39 + runHook preCheck 40 + 41 + nosetests --exclude test_getaddrinfo --exclude test_hosts_no_network 31 42 32 - doCheck = false; # too much transient errors to bother 43 + runHook postCheck 44 + ''; 33 45 34 46 # unfortunately, it needs /etc/protocol to be present to not fail 35 - #pythonImportsCheck = [ "eventlet" ]; 47 + # pythonImportsCheck = [ "eventlet" ]; 36 48 37 49 meta = with lib; { 38 50 homepage = "https://pypi.python.org/pypi/eventlet/"; 39 51 description = "A concurrent networking library for Python"; 52 + maintainers = with maintainers; [ SuperSandro2000 ]; 40 53 license = licenses.mit; 41 54 }; 42 - 43 55 }