2022-02-10 20:34:41 +00:00
|
|
|
{ lib
|
|
|
|
, fetchPypi
|
|
|
|
, buildPythonPackage
|
|
|
|
, isPyPy
|
|
|
|
, python
|
|
|
|
, libev
|
2023-10-09 19:29:22 +00:00
|
|
|
, cffi
|
2024-04-21 15:54:59 +00:00
|
|
|
, cython
|
2022-02-10 20:34:41 +00:00
|
|
|
, greenlet
|
2023-11-16 04:20:00 +00:00
|
|
|
, importlib-metadata
|
2022-09-30 11:47:45 +00:00
|
|
|
, setuptools
|
2023-10-09 19:29:22 +00:00
|
|
|
, wheel
|
2024-01-13 08:15:51 +00:00
|
|
|
, zope-event
|
|
|
|
, zope-interface
|
2022-02-10 20:34:41 +00:00
|
|
|
, pythonOlder
|
2024-04-21 15:54:59 +00:00
|
|
|
, c-ares
|
|
|
|
, libuv
|
2024-01-02 11:29:13 +00:00
|
|
|
|
|
|
|
# for passthru.tests
|
|
|
|
, dulwich
|
|
|
|
, gunicorn
|
|
|
|
, opentracing
|
|
|
|
, pika
|
2020-06-15 15:56:04 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "gevent";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "24.2.1";
|
2020-06-15 15:56:04 +00:00
|
|
|
format = "pyproject";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-02-10 20:34:41 +00:00
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2024-04-21 15:54:59 +00:00
|
|
|
hash = "sha256-Qy/Hb2gKz3zxiMLuD106tztjwfAxFMfNijTOu+WqIFY=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-09-30 11:47:45 +00:00
|
|
|
nativeBuildInputs = [
|
2024-04-21 15:54:59 +00:00
|
|
|
cython
|
2022-09-30 11:47:45 +00:00
|
|
|
setuptools
|
2023-10-09 19:29:22 +00:00
|
|
|
wheel
|
|
|
|
] ++ lib.optionals (!isPyPy) [
|
|
|
|
cffi
|
2022-09-30 11:47:45 +00:00
|
|
|
];
|
|
|
|
|
2022-02-10 20:34:41 +00:00
|
|
|
buildInputs = [
|
|
|
|
libev
|
2024-04-21 15:54:59 +00:00
|
|
|
libuv
|
|
|
|
c-ares
|
2022-02-10 20:34:41 +00:00
|
|
|
];
|
|
|
|
|
2020-06-15 15:56:04 +00:00
|
|
|
propagatedBuildInputs = [
|
2023-11-16 04:20:00 +00:00
|
|
|
importlib-metadata
|
2024-01-13 08:15:51 +00:00
|
|
|
zope-event
|
|
|
|
zope-interface
|
2022-02-10 20:34:41 +00:00
|
|
|
] ++ lib.optionals (!isPyPy) [
|
|
|
|
greenlet
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
# Bunch of failures.
|
|
|
|
doCheck = false;
|
|
|
|
|
2022-02-10 20:34:41 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"gevent"
|
2023-11-16 04:20:00 +00:00
|
|
|
"gevent.events"
|
2022-02-10 20:34:41 +00:00
|
|
|
];
|
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
passthru.tests = {
|
|
|
|
inherit
|
|
|
|
dulwich
|
|
|
|
gunicorn
|
|
|
|
opentracing
|
|
|
|
pika;
|
|
|
|
} // lib.filterAttrs (k: v: lib.hasInfix "gevent" k) python.pkgs;
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
GEVENTSETUP_EMBED = "0";
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Coroutine-based networking library";
|
|
|
|
homepage = "http://www.gevent.org/";
|
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ bjornfor ];
|
2022-02-10 20:34:41 +00:00
|
|
|
platforms = platforms.unix;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|