2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
pythonOlder,
|
2024-01-13 08:15:51 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
# build-system
|
|
|
|
setuptools,
|
2024-01-13 08:15:51 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
# dependencies
|
|
|
|
bidict,
|
|
|
|
python-engineio,
|
2024-01-13 08:15:51 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
# optional-dependencies
|
|
|
|
aiohttp,
|
|
|
|
requests,
|
|
|
|
websocket-client,
|
2024-01-13 08:15:51 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
# tests
|
|
|
|
msgpack,
|
|
|
|
pytestCheckHook,
|
|
|
|
simple-websocket,
|
|
|
|
uvicorn,
|
2024-01-13 08:15:51 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "python-socketio";
|
2024-09-19 14:19:46 +00:00
|
|
|
version = "5.11.4";
|
2024-01-13 08:15:51 +00:00
|
|
|
pyproject = true;
|
2021-12-06 16:07:01 +00:00
|
|
|
|
|
|
|
disabled = pythonOlder "3.6";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-09 10:05:03 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "miguelgrinberg";
|
|
|
|
repo = "python-socketio";
|
2024-01-13 08:15:51 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2024-09-19 14:19:46 +00:00
|
|
|
hash = "sha256-iWe9IwUR+nq9SAmHzFZYUJpVOOEbc1ZdiMAjaBjQrVs=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeBuildInputs = [ setuptools ];
|
2024-01-13 08:15:51 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
propagatedBuildInputs = [
|
2021-01-09 10:05:03 +00:00
|
|
|
bidict
|
2020-04-24 23:36:52 +00:00
|
|
|
python-engineio
|
|
|
|
];
|
|
|
|
|
2022-12-28 21:21:41 +00:00
|
|
|
passthru.optional-dependencies = {
|
|
|
|
client = [
|
|
|
|
requests
|
|
|
|
websocket-client
|
|
|
|
];
|
2024-06-05 15:53:02 +00:00
|
|
|
asyncio_client = [ aiohttp ];
|
2022-12-28 21:21:41 +00:00
|
|
|
};
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-10-01 09:20:50 +00:00
|
|
|
msgpack
|
2021-01-09 10:05:03 +00:00
|
|
|
pytestCheckHook
|
2024-01-13 08:15:51 +00:00
|
|
|
uvicorn
|
|
|
|
simple-websocket
|
|
|
|
] ++ lib.flatten (lib.attrValues passthru.optional-dependencies);
|
2021-01-09 10:05:03 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "socketio" ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2021-01-09 10:05:03 +00:00
|
|
|
description = "Python Socket.IO server and client";
|
|
|
|
longDescription = ''
|
|
|
|
Socket.IO is a lightweight transport protocol that enables real-time
|
|
|
|
bidirectional event-based communication between clients and a server.
|
|
|
|
'';
|
2021-02-17 17:02:09 +00:00
|
|
|
homepage = "https://github.com/miguelgrinberg/python-socketio/";
|
2022-12-28 21:21:41 +00:00
|
|
|
changelog = "https://github.com/miguelgrinberg/python-socketio/blob/v${version}/CHANGES.md";
|
2021-01-09 10:05:03 +00:00
|
|
|
license = with licenses; [ mit ];
|
|
|
|
maintainers = with maintainers; [ mic92 ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|