python312Packages.fnllm: 0.0.11 -> 0.0.12 (#364582)
[NixPkgs.git] / pkgs / development / python-modules / python-engineio / default.nix
blob60f1fa2895d25590e5945abe4794fac95b597dce
2   lib,
3   stdenv,
4   aiohttp,
5   buildPythonPackage,
6   setuptools,
7   eventlet,
8   fetchFromGitHub,
9   iana-etc,
10   libredirect,
11   mock,
12   pytestCheckHook,
13   pythonOlder,
14   requests,
15   simple-websocket,
16   tornado,
17   websocket-client,
20 buildPythonPackage rec {
21   pname = "python-engineio";
22   version = "4.10.1";
23   pyproject = true;
25   disabled = pythonOlder "3.8";
27   src = fetchFromGitHub {
28     owner = "miguelgrinberg";
29     repo = "python-engineio";
30     rev = "refs/tags/v${version}";
31     hash = "sha256-qfFMpE0aW8/TUBaKcaD/qV+JaBEqNR3WZ+mhQQsXkdU=";
32   };
34   build-system = [ setuptools ];
36   dependencies = [ simple-websocket ];
38   optional-dependencies = {
39     client = [
40       requests
41       websocket-client
42     ];
43     asyncio_client = [ aiohttp ];
44   };
46   nativeCheckInputs = [
47     aiohttp
48     eventlet
49     mock
50     requests
51     tornado
52     websocket-client
53     pytestCheckHook
54   ];
56   doCheck = !stdenv.hostPlatform.isDarwin;
58   preCheck = lib.optionalString stdenv.hostPlatform.isLinux ''
59     echo "nameserver 127.0.0.1" > resolv.conf
60     export NIX_REDIRECTS=/etc/protocols=${iana-etc}/etc/protocols:/etc/resolv.conf=$(realpath resolv.conf) \
61       LD_PRELOAD=${libredirect}/lib/libredirect.so
62   '';
64   postCheck = ''
65     unset NIX_REDIRECTS LD_PRELOAD
66   '';
68   # somehow effective log level does not change?
69   disabledTests = [ "test_logger" ];
71   pythonImportsCheck = [ "engineio" ];
73   meta = with lib; {
74     description = "Python based Engine.IO client and server";
75     longDescription = ''
76       Engine.IO is a lightweight transport protocol that enables real-time
77       bidirectional event-based communication between clients and a server.
78     '';
79     homepage = "https://github.com/miguelgrinberg/python-engineio/";
80     changelog = "https://github.com/miguelgrinberg/python-engineio/blob/v${version}/CHANGES.md";
81     license = with licenses; [ mit ];
82     maintainers = with maintainers; [ mic92 ];
83   };