1{ lib 2, aenum 3, aiohttp 4, aiohttp-wsgi 5, async-timeout 6, buildPythonPackage 7, fetchFromGitHub 8, pytestCheckHook 9, pythonAtLeast 10, pythonOlder 11, pytest-aiohttp 12, pytest-asyncio 13, requests 14, websocket-client 15, websockets 16}: 17 18buildPythonPackage rec { 19 pname = "homematicip"; 20 version = "1.0.9"; 21 format = "setuptools"; 22 23 disabled = pythonOlder "3.6"; 24 25 src = fetchFromGitHub { 26 owner = "hahn-th"; 27 repo = "homematicip-rest-api"; 28 rev = "refs/tags/${version}"; 29 hash = "sha256-pQVSbR4MLbyHQRAoCFOMnOrhuAnGRMyiXm1szHvANuA="; 30 }; 31 32 propagatedBuildInputs = [ 33 aenum 34 aiohttp 35 async-timeout 36 requests 37 websocket-client 38 websockets 39 ]; 40 41 checkInputs = [ 42 aiohttp-wsgi 43 pytest-aiohttp 44 pytest-asyncio 45 pytestCheckHook 46 ]; 47 48 pytestFlagsArray = [ 49 "--asyncio-mode=auto" 50 ]; 51 52 disabledTests = [ 53 # Assert issues with datetime 54 "test_contact_interface_device" 55 "test_dimmer" 56 "test_heating_failure_alert_group" 57 "test_heating" 58 "test_humidity_warning_rule_group" 59 "test_meta_group" 60 "test_pluggable_switch_measuring" 61 "test_rotary_handle_sensor" 62 "test_security_group" 63 "test_security_zone" 64 "test_shutter_device" 65 "test_smoke_detector" 66 "test_switching_group" 67 "test_temperature_humidity_sensor_outdoor" 68 "test_wall_mounted_thermostat_pro" 69 "test_weather_sensor" 70 # Random failures 71 "test_home_getSecurityJournal" 72 "test_home_unknown_types" 73 # Requires network access 74 "test_websocket" 75 ] ++ lib.optionals (pythonAtLeast "3.10") [ 76 "test_connection_lost" 77 "test_user_disconnect_and_reconnect" 78 "test_ws_message" 79 "test_ws_no_pong" 80 ]; 81 82 pythonImportsCheck = [ 83 "homematicip" 84 ]; 85 86 meta = with lib; { 87 description = "Module for the homematicIP REST API"; 88 homepage = "https://github.com/hahn-th/homematicip-rest-api"; 89 license = with licenses; [ gpl3Only ]; 90 maintainers = with maintainers; [ fab ]; 91 }; 92}