2022-02-10 20:34:41 +00:00
|
|
|
{ lib
|
|
|
|
, fetchPypi
|
|
|
|
, buildPythonPackage
|
|
|
|
, isPyPy
|
|
|
|
, python
|
|
|
|
, libev
|
2023-10-09 19:29:22 +00:00
|
|
|
, cffi
|
|
|
|
, cython_3
|
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
|
2022-02-10 20:34:41 +00:00
|
|
|
, zope_event
|
2020-06-15 15:56:04 +00:00
|
|
|
, zope_interface
|
2022-02-10 20:34:41 +00:00
|
|
|
, pythonOlder
|
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-01-02 11:29:13 +00:00
|
|
|
version = "23.9.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-01-02 11:29:13 +00:00
|
|
|
hash = "sha256-csACI1OQ1G+Uk4qWkg2IVtT/2d32KjA6DXwRiJQJfjQ=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-09-30 11:47:45 +00:00
|
|
|
nativeBuildInputs = [
|
2023-10-09 19:29:22 +00:00
|
|
|
cython_3
|
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
|
|
|
|
];
|
|
|
|
|
2020-06-15 15:56:04 +00:00
|
|
|
propagatedBuildInputs = [
|
2023-11-16 04:20:00 +00:00
|
|
|
importlib-metadata
|
2022-02-10 20:34:41 +00:00
|
|
|
zope_event
|
2020-06-15 15:56:04 +00:00
|
|
|
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;
|
|
|
|
|
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
|
|
|
};
|
|
|
|
}
|