From a79ddca1b5deebf258c93bc78558f76a378024b4 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Fri, 7 May 2021 18:48:08 +0200 Subject: [PATCH 1/3] python3Packages.asyncstdlib: init at 3.9.1 --- .../python-modules/asyncstdlib/default.nix | 38 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 40 insertions(+) create mode 100644 pkgs/development/python-modules/asyncstdlib/default.nix diff --git a/pkgs/development/python-modules/asyncstdlib/default.nix b/pkgs/development/python-modules/asyncstdlib/default.nix new file mode 100644 index 00000000000..63e096bdc0f --- /dev/null +++ b/pkgs/development/python-modules/asyncstdlib/default.nix @@ -0,0 +1,38 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, typing-extensions +, pytestCheckHook +, pythonOlder +}: + +buildPythonPackage rec { + pname = "asyncstdlib"; + version = "3.9.1"; + disabled = pythonOlder "3.7"; + format = "flit"; + + src = fetchFromGitHub { + owner = "maxfischer2781"; + repo = pname; + rev = "v${version}"; + sha256 = "13ranr7zi61w52vfrxwkf32bbhk88j0r5c5z2x2h5vw268001lk2"; + }; + + propagatedBuildInputs = [ + typing-extensions + ]; + + checkInputs = [ + pytestCheckHook + ]; + + pythonImportsCheck = [ "asyncstdlib" ]; + + meta = with lib; { + description = "Python library that extends the Python asyncio standard library"; + homepage = "https://asyncstdlib.readthedocs.io/"; + license = with licenses; [ mit ]; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 39c7940c610..41f8748ce5c 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -557,6 +557,8 @@ in { asyncssh = callPackage ../development/python-modules/asyncssh { }; + asyncstdlib = callPackage ../development/python-modules/asyncstdlib { }; + async_stagger = callPackage ../development/python-modules/async_stagger { }; asynctest = callPackage ../development/python-modules/asynctest { }; From 4fcefbe10c7bc13d1c980422aee8d7b4de4f1b38 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Fri, 7 May 2021 18:49:30 +0200 Subject: [PATCH 2/3] python3Packages.denonavr: 0.9.10 -> 0.10.6 --- .../python-modules/denonavr/default.nix | 40 ++++++++++++++----- 1 file changed, 29 insertions(+), 11 deletions(-) diff --git a/pkgs/development/python-modules/denonavr/default.nix b/pkgs/development/python-modules/denonavr/default.nix index b02e1e498b9..02b4ba47714 100644 --- a/pkgs/development/python-modules/denonavr/default.nix +++ b/pkgs/development/python-modules/denonavr/default.nix @@ -1,33 +1,51 @@ -{ lib, buildPythonPackage, fetchFromGitHub, isPy27, requests, netifaces -, pytestCheckHook, testtools, requests-mock }: +{ lib +, asyncstdlib +, attrs +, buildPythonPackage +, defusedxml +, fetchFromGitHub +, httpx +, netifaces +, pytest-asyncio +, pytestCheckHook +, pytest-httpx +, pytest-timeout +, pythonOlder +}: buildPythonPackage rec { pname = "denonavr"; - version = "0.9.10"; - disabled = isPy27; + version = "0.10.6"; + disabled = pythonOlder "3.6"; src = fetchFromGitHub { owner = "scarface-4711"; - repo = "denonavr"; + repo = pname; rev = version; - sha256 = "sha256-3ap8F3ayBTpaR98md+gT0+hkIWlFBNxStTGWT5AL//A="; + sha256 = "sha256-jcbjExcyZSE+qVPuYiMmuneugDMBoYz4apY/lz4JnMI="; }; propagatedBuildInputs = [ - requests + asyncstdlib + attrs + defusedxml + httpx netifaces ]; checkInputs = [ + pytest-asyncio pytestCheckHook - testtools - requests-mock + pytest-httpx + pytest-timeout ]; + pythonImportsCheck = [ "denonavr" ]; + meta = with lib; { + description = "Automation Library for Denon AVR receivers"; homepage = "https://github.com/scarface-4711/denonavr"; - description = "Automation Library for Denon AVR receivers."; - license = licenses.mit; + license = with licenses; [ mit ]; maintainers = with maintainers; [ colemickens ]; }; } From d36f6915acd93bddec2b9849160ac0db875d6c79 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Fri, 7 May 2021 18:57:23 +0200 Subject: [PATCH 3/3] home-assistant: enable denonavr tests --- pkgs/servers/home-assistant/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/servers/home-assistant/default.nix b/pkgs/servers/home-assistant/default.nix index cb455738080..dce644605b4 100644 --- a/pkgs/servers/home-assistant/default.nix +++ b/pkgs/servers/home-assistant/default.nix @@ -243,6 +243,7 @@ in with py.pkgs; buildPythonApplication rec { "deconz" "default_config" "demo" + "denonavr" "derivative" "device_automation" "device_sun_light_trigger"