nixpkgs/pkgs/development/python-modules/lomond/default.nix
Martin Weinelt 9c295d34e1 python3Packages.lomond: disable tornado_4 tests on python3.10
And organize a makeover for the package.
2022-05-26 13:32:43 +02:00

63 lines
1.2 KiB
Nix

{ buildPythonPackage
, fetchFromGitHub
, lib
, pythonAtLeast
, pythonOlder
# runtime
, six
# tests
, freezegun
, pytest-mock
, pytestCheckHook
, tornado_4
}:
buildPythonPackage rec {
pname = "lomond";
version = "0.3.3";
src = fetchFromGitHub {
owner = "wildfoundry";
repo = "dataplicity-${pname}";
rev = "b30dad3cc38d5ff210c5dd01f8c3c76aa6c616d1";
sha256 = "0lydq0imala08wxdyg2iwhqa6gcdrn24ah14h91h2zcxjhjk4gv8";
};
postPatch = ''
substituteInPlace setup.py \
--replace "'pytest-runner'" ""
'';
propagatedBuildInputs = [
six
];
checkInputs = [
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"
];
meta = with lib; {
description = "Websocket Client Library";
homepage = "https://github.com/wildfoundry/dataplicity-lomond";
license = licenses.bsd3;
maintainers = with maintainers; [ jamiemagee ];
};
}