depot/third_party/nixpkgs/pkgs/development/python-modules/gevent/default.nix
Default email 504525a148 Project import generated by Copybara.
GitOrigin-RevId: bd645e8668ec6612439a9ee7e71f7eac4099d4f6
2024-01-02 12:29:13 +01:00

79 lines
1.2 KiB
Nix

{ lib
, fetchPypi
, buildPythonPackage
, isPyPy
, python
, libev
, cffi
, cython_3
, greenlet
, importlib-metadata
, setuptools
, wheel
, zope_event
, zope_interface
, pythonOlder
# for passthru.tests
, dulwich
, gunicorn
, opentracing
, pika
}:
buildPythonPackage rec {
pname = "gevent";
version = "23.9.1";
format = "pyproject";
disabled = pythonOlder "3.7";
src = fetchPypi {
inherit pname version;
hash = "sha256-csACI1OQ1G+Uk4qWkg2IVtT/2d32KjA6DXwRiJQJfjQ=";
};
nativeBuildInputs = [
cython_3
setuptools
wheel
] ++ lib.optionals (!isPyPy) [
cffi
];
buildInputs = [
libev
];
propagatedBuildInputs = [
importlib-metadata
zope_event
zope_interface
] ++ lib.optionals (!isPyPy) [
greenlet
];
# Bunch of failures.
doCheck = false;
pythonImportsCheck = [
"gevent"
"gevent.events"
];
passthru.tests = {
inherit
dulwich
gunicorn
opentracing
pika;
} // lib.filterAttrs (k: v: lib.hasInfix "gevent" k) python.pkgs;
meta = with lib; {
description = "Coroutine-based networking library";
homepage = "http://www.gevent.org/";
license = licenses.mit;
maintainers = with maintainers; [ bjornfor ];
platforms = platforms.unix;
};
}