2021-04-12 18:23:04 +00:00
|
|
|
{ lib
|
|
|
|
, aenum
|
|
|
|
, aiohttp
|
|
|
|
, aiohttp-wsgi
|
|
|
|
, async-timeout
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, pytestCheckHook
|
2022-01-19 23:45:15 +00:00
|
|
|
, pythonAtLeast
|
2021-04-12 18:23:04 +00:00
|
|
|
, pythonOlder
|
|
|
|
, pytest-aiohttp
|
|
|
|
, pytest-asyncio
|
|
|
|
, requests
|
2021-06-28 23:13:55 +00:00
|
|
|
, websocket-client
|
2021-04-12 18:23:04 +00:00
|
|
|
, websockets
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "homematicip";
|
2023-10-09 19:29:22 +00:00
|
|
|
version = "1.0.15";
|
2021-12-26 17:43:05 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
2022-11-27 09:42:12 +00:00
|
|
|
disabled = pythonOlder "3.8";
|
2021-04-12 18:23:04 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2022-07-14 12:49:19 +00:00
|
|
|
owner = "hahn-th";
|
2021-04-12 18:23:04 +00:00
|
|
|
repo = "homematicip-rest-api";
|
2022-08-12 12:06:08 +00:00
|
|
|
rev = "refs/tags/${version}";
|
2023-10-09 19:29:22 +00:00
|
|
|
hash = "sha256-wetkcHtm5O6mxhyU3/E4yrv6UGHAdKUlae2wJdCXtJI=";
|
2021-04-12 18:23:04 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
aenum
|
|
|
|
aiohttp
|
|
|
|
async-timeout
|
|
|
|
requests
|
2021-06-28 23:13:55 +00:00
|
|
|
websocket-client
|
2021-04-12 18:23:04 +00:00
|
|
|
websockets
|
|
|
|
];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2021-04-12 18:23:04 +00:00
|
|
|
aiohttp-wsgi
|
|
|
|
pytest-aiohttp
|
|
|
|
pytest-asyncio
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
2022-08-12 12:06:08 +00:00
|
|
|
pytestFlagsArray = [
|
2022-11-21 17:40:18 +00:00
|
|
|
"--asyncio-mode=auto"
|
2022-08-12 12:06:08 +00:00
|
|
|
];
|
|
|
|
|
2021-04-12 18:23:04 +00:00
|
|
|
disabledTests = [
|
|
|
|
# Assert issues with datetime
|
|
|
|
"test_contact_interface_device"
|
|
|
|
"test_dimmer"
|
2022-12-02 08:20:57 +00:00
|
|
|
"test_external_device"
|
2021-04-12 18:23:04 +00:00
|
|
|
"test_heating_failure_alert_group"
|
|
|
|
"test_heating"
|
|
|
|
"test_humidity_warning_rule_group"
|
|
|
|
"test_meta_group"
|
|
|
|
"test_pluggable_switch_measuring"
|
|
|
|
"test_rotary_handle_sensor"
|
|
|
|
"test_security_group"
|
2021-08-08 23:34:03 +00:00
|
|
|
"test_security_zone"
|
2021-04-12 18:23:04 +00:00
|
|
|
"test_shutter_device"
|
|
|
|
"test_smoke_detector"
|
|
|
|
"test_switching_group"
|
|
|
|
"test_temperature_humidity_sensor_outdoor"
|
|
|
|
"test_wall_mounted_thermostat_pro"
|
|
|
|
"test_weather_sensor"
|
|
|
|
# Random failures
|
|
|
|
"test_home_getSecurityJournal"
|
|
|
|
"test_home_unknown_types"
|
|
|
|
# Requires network access
|
|
|
|
"test_websocket"
|
2022-01-19 23:45:15 +00:00
|
|
|
] ++ lib.optionals (pythonAtLeast "3.10") [
|
|
|
|
"test_connection_lost"
|
|
|
|
"test_user_disconnect_and_reconnect"
|
|
|
|
"test_ws_message"
|
|
|
|
"test_ws_no_pong"
|
2021-04-12 18:23:04 +00:00
|
|
|
];
|
|
|
|
|
2021-12-26 17:43:05 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"homematicip"
|
|
|
|
];
|
2021-04-12 18:23:04 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
2022-07-14 12:49:19 +00:00
|
|
|
description = "Module for the homematicIP REST API";
|
|
|
|
homepage = "https://github.com/hahn-th/homematicip-rest-api";
|
2022-11-27 09:42:12 +00:00
|
|
|
changelog = "https://github.com/hahn-th/homematicip-rest-api/releases/tag/${version}";
|
2021-04-12 18:23:04 +00:00
|
|
|
license = with licenses; [ gpl3Only ];
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|