at 25.11-pre 1.5 kB view raw
1{ 2 stdenv, 3 lib, 4 fetchPypi, 5 buildPythonPackage, 6 isPyPy, 7 python, 8 libev, 9 cffi, 10 cython, 11 greenlet, 12 importlib-metadata, 13 setuptools, 14 wheel, 15 zope-event, 16 zope-interface, 17 pythonOlder, 18 c-ares, 19 libuv, 20 21 # for passthru.tests 22 dulwich, 23 gunicorn, 24 pika, 25}: 26 27buildPythonPackage rec { 28 pname = "gevent"; 29 version = "24.11.1"; 30 format = "pyproject"; 31 32 disabled = pythonOlder "3.7"; 33 34 src = fetchPypi { 35 inherit pname version; 36 hash = "sha256-i9FBkRTp5KPtM6W612av/5o892XLRApYKhs6m8gMGso="; 37 }; 38 39 nativeBuildInputs = [ 40 cython 41 setuptools 42 wheel 43 ] ++ lib.optionals (!isPyPy) [ cffi ]; 44 45 buildInputs = [ 46 libev 47 libuv 48 c-ares 49 ]; 50 51 propagatedBuildInputs = [ 52 importlib-metadata 53 zope-event 54 zope-interface 55 ] ++ lib.optionals (!isPyPy) [ greenlet ]; 56 57 env = lib.optionalAttrs stdenv.cc.isGNU { 58 NIX_CFLAGS_COMPILE = "-Wno-error=incompatible-pointer-types"; 59 }; 60 61 # Bunch of failures. 62 doCheck = false; 63 64 pythonImportsCheck = [ 65 "gevent" 66 "gevent.events" 67 ]; 68 69 passthru.tests = { 70 inherit 71 dulwich 72 gunicorn 73 pika 74 ; 75 } // lib.filterAttrs (k: v: lib.hasInfix "gevent" k) python.pkgs; 76 77 GEVENTSETUP_EMBED = "0"; 78 79 meta = with lib; { 80 description = "Coroutine-based networking library"; 81 homepage = "http://www.gevent.org/"; 82 license = licenses.mit; 83 maintainers = with maintainers; [ bjornfor ]; 84 platforms = platforms.unix; 85 }; 86}