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 [
44 # Makes HTTP requests
45 "test_proxy"
46 "test_live"
47 ]
48 ++ lib.optionals (pythonAtLeast "3.12") [
49 # https://github.com/wildfoundry/dataplicity-lomond/issues/91
50 "test_that_on_ping_responds_with_pong"
51 ];
52
53 disabledTestPaths = [
54 # requires tornado_4, which is not compatible with python3.10
55 "tests/test_integration.py"
56 ];
57
58 meta = with lib; {
59 description = "Websocket Client Library";
60 homepage = "https://github.com/wildfoundry/dataplicity-lomond";
61 license = licenses.bsd3;
62 maintainers = with maintainers; [ jamiemagee ];
63 };
64}