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";
|
2022-10-21 18:38:19 +00:00
|
|
|
version = "1.0.9";
|
2021-12-26 17:43:05 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
2021-04-12 18:23:04 +00:00
|
|
|
disabled = pythonOlder "3.6";
|
|
|
|
|
|
|
|
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}";
|
2022-10-21 18:38:19 +00:00
|
|
|
hash = "sha256-pQVSbR4MLbyHQRAoCFOMnOrhuAnGRMyiXm1szHvANuA=";
|
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
|
|
|
|
];
|
|
|
|
|
|
|
|
checkInputs = [
|
|
|
|
aiohttp-wsgi
|
|
|
|
pytest-aiohttp
|
|
|
|
pytest-asyncio
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
|
|
|
|
2022-08-12 12:06:08 +00:00
|
|
|
pytestFlagsArray = [
|
|
|
|
"--asyncio-mode=legacy"
|
|
|
|
];
|
|
|
|
|
2021-04-12 18:23:04 +00:00
|
|
|
disabledTests = [
|
|
|
|
# Assert issues with datetime
|
|
|
|
"test_contact_interface_device"
|
|
|
|
"test_dimmer"
|
|
|
|
"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";
|
2021-04-12 18:23:04 +00:00
|
|
|
license = with licenses; [ gpl3Only ];
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|