2021-01-15 22:18:51 +00:00
|
|
|
{ lib
|
2021-08-08 23:34:03 +00:00
|
|
|
, assertpy
|
2021-01-15 22:18:51 +00:00
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
2021-06-04 09:07:49 +00:00
|
|
|
, poetry-core
|
2021-01-15 22:18:51 +00:00
|
|
|
, pytest-asyncio
|
2021-08-08 23:34:03 +00:00
|
|
|
, pytest-mockservers
|
|
|
|
, pytest-resource-path
|
2021-01-15 22:18:51 +00:00
|
|
|
, pytest-sugar
|
|
|
|
, pytestCheckHook
|
2022-10-21 18:38:19 +00:00
|
|
|
, pythonOlder
|
2021-08-08 23:34:03 +00:00
|
|
|
, time-machine
|
2021-01-15 22:18:51 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "aioswitcher";
|
2022-10-30 15:09:59 +00:00
|
|
|
version = "3.2.0";
|
2021-01-15 22:18:51 +00:00
|
|
|
format = "pyproject";
|
|
|
|
|
2022-10-21 18:38:19 +00:00
|
|
|
disabled = pythonOlder "3.9";
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "TomerFi";
|
|
|
|
repo = pname;
|
2022-04-15 01:41:22 +00:00
|
|
|
rev = "refs/tags/${version}";
|
2022-10-30 15:09:59 +00:00
|
|
|
hash = "sha256-Vob5p0+SlZR2eHj5Br2pWp3FCxW+zgY6crh8jrkreT0=";
|
2021-01-15 22:18:51 +00:00
|
|
|
};
|
|
|
|
|
2021-06-04 09:07:49 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
poetry-core
|
|
|
|
];
|
2021-01-15 22:18:51 +00:00
|
|
|
|
2021-08-08 23:34:03 +00:00
|
|
|
preCheck = ''
|
|
|
|
export TZ=Asia/Jerusalem
|
|
|
|
'';
|
2021-01-15 22:18:51 +00:00
|
|
|
|
|
|
|
checkInputs = [
|
2021-08-08 23:34:03 +00:00
|
|
|
assertpy
|
2021-01-15 22:18:51 +00:00
|
|
|
pytest-asyncio
|
2021-08-08 23:34:03 +00:00
|
|
|
pytest-mockservers
|
|
|
|
pytest-resource-path
|
2021-01-15 22:18:51 +00:00
|
|
|
pytest-sugar
|
|
|
|
pytestCheckHook
|
2021-08-08 23:34:03 +00:00
|
|
|
time-machine
|
|
|
|
];
|
|
|
|
|
|
|
|
disabledTests = [
|
|
|
|
# AssertionError: Expected <14:00> to be equal to <17:00>, but was not.
|
|
|
|
"test_schedule_parser_with_a_weekly_recurring_enabled_schedule_data"
|
|
|
|
"test_schedule_parser_with_a_daily_recurring_enabled_schedule_data"
|
|
|
|
"test_schedule_parser_with_a_partial_daily_recurring_enabled_schedule_data"
|
|
|
|
"test_schedule_parser_with_a_non_recurring_enabled_schedule_data"
|
2022-06-26 10:26:21 +00:00
|
|
|
"test_hexadecimale_timestamp_to_localtime_with_the_current_timestamp_should_return_a_time_string"
|
2021-01-15 22:18:51 +00:00
|
|
|
];
|
|
|
|
|
2022-10-06 18:32:54 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"aioswitcher"
|
|
|
|
];
|
2021-01-15 22:18:51 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Python module to interact with Switcher water heater";
|
|
|
|
homepage = "https://github.com/TomerFi/aioswitcher";
|
|
|
|
license = with licenses; [ mit ];
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|