1{
2 buildPythonPackage,
3 fetchFromGitHub,
4 lib,
5 pythonAtLeast,
6 pythonOlder,
7
8 # runtime
9 six,
10
11 # tests
12 freezegun,
13 pytest-mock,
14 pytestCheckHook,
15}:
16
17buildPythonPackage rec {
18 pname = "lomond";
19 version = "0.3.3";
20 format = "setuptools";
21
22 src = fetchFromGitHub {
23 owner = "wildfoundry";
24 repo = "dataplicity-${pname}";
25 rev = "b30dad3cc38d5ff210c5dd01f8c3c76aa6c616d1";
26 sha256 = "0lydq0imala08wxdyg2iwhqa6gcdrn24ah14h91h2zcxjhjk4gv8";
27 };
28
29 postPatch = ''
30 substituteInPlace setup.py \
31 --replace "'pytest-runner'" ""
32 '';
33
34 propagatedBuildInputs = [ six ];
35
36 nativeCheckInputs = [
37 freezegun
38 pytest-mock
39 pytestCheckHook
40 ];
41
42 disabledTests = [
43 # Makes HTTP requests
44 "test_proxy"
45 "test_live"
46 ]
47 ++ lib.optionals (pythonAtLeast "3.12") [
48 # https://github.com/wildfoundry/dataplicity-lomond/issues/91
49 "test_that_on_ping_responds_with_pong"
50 ];
51
52 disabledTestPaths = [
53 # requires tornado_4, which is not compatible with python3.10
54 "tests/test_integration.py"
55 ];
56
57 meta = with lib; {
58 description = "Websocket Client Library";
59 homepage = "https://github.com/wildfoundry/dataplicity-lomond";
60 license = licenses.bsd3;
61 maintainers = with maintainers; [ jamiemagee ];
62 };
63}