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