hoarder: 0.21.0 -> 0.22.0
[NixPkgs.git] / pkgs / development / python-modules / python-socketio / default.nix
blob506e31492cc62cc7dbf79b53ad20dd9f0666afe9
2   lib,
3   stdenv,
4   buildPythonPackage,
5   fetchFromGitHub,
7   # build-system
8   setuptools,
10   # dependencies
11   bidict,
12   python-engineio,
14   # optional-dependencies
15   aiohttp,
16   requests,
17   websocket-client,
19   # tests
20   msgpack,
21   pytestCheckHook,
22   simple-websocket,
23   uvicorn,
27 buildPythonPackage rec {
28   pname = "python-socketio";
29   version = "5.12.1";
30   pyproject = true;
32   src = fetchFromGitHub {
33     owner = "miguelgrinberg";
34     repo = "python-socketio";
35     tag = "v${version}";
36     hash = "sha256-oIlPPddp9zr3oK/2zXYyuzbhL8nAs1k2DVIumvODimQ=";
37   };
39   build-system = [ setuptools ];
41   dependencies = [
42     bidict
43     python-engineio
44   ];
46   optional-dependencies = {
47     client = [
48       requests
49       websocket-client
50     ];
51     asyncio_client = [ aiohttp ];
52   };
54   nativeCheckInputs = [
55     msgpack
56     pytestCheckHook
57     uvicorn
58     simple-websocket
59   ] ++ lib.flatten (lib.attrValues optional-dependencies);
61   pythonImportsCheck = [ "socketio" ];
63   disabledTestPaths = lib.optionals stdenv.hostPlatform.isDarwin [
64     # Use fixed ports which leads to failures when building concurrently
65     "tests/async/test_admin.py"
66     "tests/common/test_admin.py"
67   ];
69   __darwinAllowLocalNetworking = true;
71   meta = {
72     description = "Python Socket.IO server and client";
73     longDescription = ''
74       Socket.IO is a lightweight transport protocol that enables real-time
75       bidirectional event-based communication between clients and a server.
76     '';
77     homepage = "https://github.com/miguelgrinberg/python-socketio/";
78     changelog = "https://github.com/miguelgrinberg/python-socketio/blob/${src.tag}/CHANGES.md";
79     license = with lib.licenses; [ mit ];
80     maintainers = with lib.maintainers; [ mic92 ];
81   };