1{
2 lib,
3 aiohttp,
4 async-timeout,
5 buildPythonPackage,
6 fetchFromGitHub,
7 jsonrpc-base,
8 pytest-asyncio_0,
9 pytestCheckHook,
10 pythonOlder,
11 setuptools,
12}:
13
14buildPythonPackage rec {
15 pname = "jsonrpc-websocket";
16 version = "3.1.6";
17 pyproject = true;
18
19 disabled = pythonOlder "3.7";
20
21 src = fetchFromGitHub {
22 owner = "emlove";
23 repo = "jsonrpc-websocket";
24 tag = version;
25 hash = "sha256-m2HiS03PZ6oiHJJ9Z2+5CfiHKIWJ1yzDqlZj22/JNAE=";
26 };
27
28 nativeBuildInputs = [ setuptools ];
29
30 propagatedBuildInputs = [
31 aiohttp
32 async-timeout
33 jsonrpc-base
34 ];
35
36 nativeCheckInputs = [
37 pytest-asyncio_0
38 pytestCheckHook
39 ];
40
41 pytestFlags = [
42 "--asyncio-mode=auto"
43 ];
44
45 enabledTestPaths = [
46 "tests.py"
47 ];
48
49 pythonImportsCheck = [ "jsonrpc_websocket" ];
50
51 meta = with lib; {
52 description = "JSON-RPC websocket client library for asyncio";
53 homepage = "https://github.com/emlove/jsonrpc-websocket";
54 license = licenses.bsd3;
55 maintainers = with maintainers; [ peterhoeg ];
56 };
57}