Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / development / python-modules / gevent / default.nix
blob938cb99cf8fa17ba48479786b7339502a9c13490
1 { lib
2 , fetchPypi
3 , fetchpatch
4 , buildPythonPackage
5 , isPyPy
6 , python
7 , libev
8 , cffi
9 , cython_3
10 , greenlet
11 , importlib-metadata
12 , setuptools
13 , wheel
14 , zope_event
15 , zope_interface
16 , pythonOlder
19 buildPythonPackage rec {
20   pname = "gevent";
21   version = "22.10.2";
22   format = "pyproject";
24   disabled = pythonOlder "3.7";
26   src = fetchPypi {
27     inherit pname version;
28     hash = "sha256-HKAdoXbuN7NSeicC99QNvJ/7jPx75aA7+k+e7EXlXEY=";
29   };
31   patches = [
32     # Replace deprecated pkg_resources with importlib-metadata
33     (fetchpatch {
34       url = "https://github.com/gevent/gevent/commit/bd96d8e14dc99f757de22ab4bb98439f912dab1e.patch";
35       hash = "sha256-Y+cxIScuEgAVYmmxBJ8OI+JuJ4G+iiROTcRdWglo3l0=";
36       includes = [ "src/gevent/events.py" ];
37     })
38   ];
40   nativeBuildInputs = [
41     cython_3
42     setuptools
43     wheel
44   ] ++ lib.optionals (!isPyPy) [
45     cffi
46   ];
48   buildInputs = [
49     libev
50   ];
52   propagatedBuildInputs = [
53     importlib-metadata
54     zope_event
55     zope_interface
56   ] ++ lib.optionals (!isPyPy) [
57     greenlet
58   ];
60   # Bunch of failures.
61   doCheck = false;
63   pythonImportsCheck = [
64     "gevent"
65     "gevent.events"
66   ];
68   meta = with lib; {
69     description = "Coroutine-based networking library";
70     homepage = "http://www.gevent.org/";
71     license = licenses.mit;
72     maintainers = with maintainers; [ bjornfor ];
73     platforms = platforms.unix;
74   };