2022-06-16 17:23:12 +00:00
|
|
|
{ buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, lib
|
|
|
|
, pythonAtLeast
|
|
|
|
, pythonOlder
|
|
|
|
|
|
|
|
# runtime
|
|
|
|
, six
|
|
|
|
|
|
|
|
# tests
|
|
|
|
, freezegun
|
|
|
|
, pytest-mock
|
|
|
|
, pytestCheckHook
|
|
|
|
, tornado_4
|
|
|
|
}:
|
2020-10-07 09:15:18 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "lomond";
|
|
|
|
version = "0.3.3";
|
2024-01-02 11:29:13 +00:00
|
|
|
format = "setuptools";
|
2020-10-07 09:15:18 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "wildfoundry";
|
|
|
|
repo = "dataplicity-${pname}";
|
|
|
|
rev = "b30dad3cc38d5ff210c5dd01f8c3c76aa6c616d1";
|
|
|
|
sha256 = "0lydq0imala08wxdyg2iwhqa6gcdrn24ah14h91h2zcxjhjk4gv8";
|
|
|
|
};
|
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.py \
|
|
|
|
--replace "'pytest-runner'" ""
|
|
|
|
'';
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
six
|
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2022-06-16 17:23:12 +00:00
|
|
|
freezegun
|
|
|
|
pytest-mock
|
|
|
|
pytestCheckHook
|
|
|
|
] ++ lib.optionals (pythonOlder "3.10") [
|
|
|
|
tornado_4
|
|
|
|
];
|
|
|
|
|
|
|
|
disabledTests = [
|
|
|
|
# Makes HTTP requests
|
|
|
|
"test_proxy"
|
|
|
|
"test_live"
|
|
|
|
];
|
|
|
|
|
|
|
|
disabledTestPaths = lib.optionals (pythonAtLeast "3.10") [
|
|
|
|
# requires tornado_4, which is not compatible with python3.10
|
|
|
|
"tests/test_integration.py"
|
|
|
|
];
|
2020-10-07 09:15:18 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Websocket Client Library";
|
|
|
|
homepage = "https://github.com/wildfoundry/dataplicity-lomond";
|
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = with maintainers; [ jamiemagee ];
|
|
|
|
};
|
|
|
|
}
|