1{ lib 2, stdenv 3, aiohttp 4, async-timeout 5, buildPythonPackage 6, defusedxml 7, fetchFromGitHub 8, pytest-aiohttp 9, pytest-asyncio 10, pytestCheckHook 11, python-didl-lite 12, pythonOlder 13, voluptuous 14}: 15 16buildPythonPackage rec { 17 pname = "async-upnp-client"; 18 version = "0.36.2"; 19 format = "setuptools"; 20 21 disabled = pythonOlder "3.8"; 22 23 src = fetchFromGitHub { 24 owner = "StevenLooman"; 25 repo = "async_upnp_client"; 26 rev = "refs/tags/${version}"; 27 hash = "sha256-f3x5adxLHT/C5dXfdBH6stKv0y2nuhbpe8jkJex1DKU="; 28 }; 29 30 propagatedBuildInputs = [ 31 aiohttp 32 async-timeout 33 defusedxml 34 python-didl-lite 35 voluptuous 36 ]; 37 38 nativeCheckInputs = [ 39 pytestCheckHook 40 pytest-aiohttp 41 pytest-asyncio 42 ]; 43 44 disabledTests = [ 45 # socket.gaierror: [Errno -2] Name or service not known 46 "test_async_get_local_ip" 47 "test_get_local_ip" 48 # OSError: [Errno 101] Network is unreachable 49 "test_auto_resubscribe_fail" 50 "test_init" 51 "test_on_notify_dlna_event" 52 "test_on_notify_upnp_event" 53 "test_server_init" 54 "test_server_start" 55 "test_start_server" 56 "test_subscribe" 57 "test_subscribe_auto_resubscribe" 58 "test_subscribe_fail" 59 "test_subscribe_manual_resubscribe" 60 "test_subscribe_renew" 61 "test_unsubscribe" 62 ] ++ lib.optionals stdenv.isDarwin [ 63 "test_deferred_callback_url" 64 ]; 65 66 disabledTestPaths = [ 67 # Tries to bind to multicast socket and fails to find proper interface 68 "tests/test_ssdp_listener.py" 69 ]; 70 71 pythonImportsCheck = [ 72 "async_upnp_client" 73 ]; 74 75 meta = with lib; { 76 description = "Asyncio UPnP Client library for Python"; 77 homepage = "https://github.com/StevenLooman/async_upnp_client"; 78 changelog = "https://github.com/StevenLooman/async_upnp_client/blob/${version}/CHANGES.rst"; 79 license = licenses.asl20; 80 maintainers = with maintainers; [ hexa ]; 81 }; 82}