From 59e6d8641805913ad0f12a9fd65c2cdc2f597a3e Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Mon, 25 Dec 2023 22:31:24 +0100 Subject: [PATCH] python311Packages.openwebifpy: 3.2.7 -> 4.0.2 Changelog: https://github.com/autinerd/openwebifpy/releases/tag/4.0.2 --- .../python-modules/openwebifpy/default.nix | 50 +++++++++++++------ 1 file changed, 35 insertions(+), 15 deletions(-) diff --git a/pkgs/development/python-modules/openwebifpy/default.nix b/pkgs/development/python-modules/openwebifpy/default.nix index 4661bb4dcf4c..ab054c3b8288 100644 --- a/pkgs/development/python-modules/openwebifpy/default.nix +++ b/pkgs/development/python-modules/openwebifpy/default.nix @@ -1,31 +1,51 @@ -{ lib, buildPythonPackage, fetchPypi, pythonOlder -, requests, zeroconf, wakeonlan -, python }: +{ lib +, aiohttp +, buildPythonPackage +, fetchPypi +, pytestCheckHook +, pythonOlder +, setuptools +, yarl +}: buildPythonPackage rec { pname = "openwebifpy"; - version = "3.2.7"; - format = "setuptools"; - disabled = pythonOlder "3.6"; + version = "4.0.2"; + pyproject = true; + + disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; - sha256 = "0n9vi6b0y8b41fd7m9p361y3qb5m3b9p9d8g4fasqi7yy4mw2hns"; + hash = "sha256-D2NCTn1Q3/AknmEAAOZO4d7i2mpM/kMlt94RaLmmnjM="; }; - propagatedBuildInputs = [ - requests - zeroconf - wakeonlan + nativeBuildInputs = [ + setuptools ]; - checkPhase = '' - ${python.interpreter} setup.py test - ''; + propagatedBuildInputs = [ + aiohttp + yarl + ]; + + nativeCheckInputs = [ + pytestCheckHook + ]; + + pythonImportsCheck = [ + "openwebif" + ]; + + disabledTests = [ + # https://github.com/autinerd/openwebifpy/issues/1 + "test_get_picon_name" + ]; meta = with lib; { description = "Provides a python interface to interact with a device running OpenWebIf"; - homepage = "https://openwebifpy.readthedocs.io/"; + homepage = "https://github.com/autinerd/openwebifpy"; + changelog = "https://github.com/autinerd/openwebifpy/releases/tag/${version}"; license = licenses.mit; maintainers = with maintainers; [ hexa ]; };