evcc: 0.131.4 -> 0.131.5
[NixPkgs.git] / pkgs / development / python-modules / aioswitcher / default.nix
blob08cbff77d200aacb00ea0e11440b7389e2f77b0a
2   lib,
3   aiohttp,
4   assertpy,
5   buildPythonPackage,
6   fetchFromGitHub,
7   freezegun,
8   poetry-core,
9   pycryptodome,
10   pytest-asyncio,
11   pytest-mockservers,
12   pytest-resource-path,
13   pytestCheckHook,
14   pythonAtLeast,
15   pythonOlder,
16   time-machine,
19 buildPythonPackage rec {
20   pname = "aioswitcher";
21   version = "4.4.1";
22   pyproject = true;
24   disabled = pythonOlder "3.9";
26   src = fetchFromGitHub {
27     owner = "TomerFi";
28     repo = "aioswitcher";
29     rev = "refs/tags/${version}";
30     hash = "sha256-O1wKw6jv2aRPLZ2hSYv3MwneeNcjO+2/RKzQ7xXWHtY=";
31   };
33   __darwinAllowLocalNetworking = true;
35   build-system = [ poetry-core ];
37   pythonRelaxDeps = [ "aiohttp" ];
39   dependencies = [
40     aiohttp
41     pycryptodome
42   ];
44   preCheck = ''
45     export TZ=Asia/Jerusalem
46   '';
48   nativeCheckInputs = [
49     assertpy
50     freezegun
51     pytest-asyncio
52     pytest-mockservers
53     pytest-resource-path
54     pytestCheckHook
55     time-machine
56   ];
58   disabledTests =
59     [
60       # AssertionError: Expected <14:00> to be equal to <17:00>, but was not.
61       "test_schedule_parser_with_a_weekly_recurring_enabled_schedule_data"
62       "test_schedule_parser_with_a_daily_recurring_enabled_schedule_data"
63       "test_schedule_parser_with_a_partial_daily_recurring_enabled_schedule_data"
64       "test_schedule_parser_with_a_non_recurring_enabled_schedule_data"
65     ]
66     ++ lib.optionals (pythonAtLeast "3.12") [
67       # ssertionError: Expected <'I' format requires 0 <= number <= 4294967295> to be equal to <argument out of range>, but was not.
68       "test_minutes_to_hexadecimal_seconds_with_a_negative_value_should_throw_an_error"
69       "test_current_timestamp_to_hexadecimal_with_errornous_value_should_throw_an_error"
70     ];
72   pythonImportsCheck = [ "aioswitcher" ];
74   meta = with lib; {
75     description = "Python module to interact with Switcher water heater";
76     homepage = "https://github.com/TomerFi/aioswitcher";
77     changelog = "https://github.com/TomerFi/aioswitcher/releases/tag/${version}";
78     license = licenses.asl20;
79     maintainers = with maintainers; [ fab ];
80   };