2021-02-05 17:12:51 +00:00
|
|
|
{ lib
|
2020-04-24 23:36:52 +00:00
|
|
|
, buildPythonPackage
|
2021-01-09 10:05:03 +00:00
|
|
|
, fetchFromGitHub
|
2021-12-06 16:07:01 +00:00
|
|
|
, pythonOlder
|
2024-01-13 08:15:51 +00:00
|
|
|
|
|
|
|
# build-system
|
|
|
|
, setuptools
|
|
|
|
|
|
|
|
# dependencies
|
|
|
|
, bidict
|
|
|
|
, python-engineio
|
|
|
|
|
|
|
|
# optional-dependencies
|
|
|
|
, aiohttp
|
2021-12-06 16:07:01 +00:00
|
|
|
, requests
|
|
|
|
, websocket-client
|
2024-01-13 08:15:51 +00:00
|
|
|
|
|
|
|
# tests
|
|
|
|
, msgpack
|
|
|
|
, pytestCheckHook
|
|
|
|
, simple-websocket
|
|
|
|
, uvicorn
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "python-socketio";
|
2024-02-29 20:09:43 +00:00
|
|
|
version = "5.11.1";
|
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-02-29 20:09:43 +00:00
|
|
|
hash = "sha256-miIl/+3JtjtoQaS6Jy0M9lPQJQp3VlpvrO5Hqlrq5JM=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-01-13 08:15:51 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
setuptools
|
|
|
|
];
|
|
|
|
|
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
|
|
|
|
];
|
|
|
|
asyncio_client = [
|
|
|
|
aiohttp
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
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
|
|
|
|
2021-12-06 16:07:01 +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
|
|
|
};
|
|
|
|
}
|