From 7b7dacca890330d1d4194c08d8f0536312be579b Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Thu, 29 Apr 2021 09:12:46 +0200 Subject: [PATCH 1/2] python3Packages.screenlogicpy: 0.3.0 -> 0.4.1 --- pkgs/development/python-modules/screenlogicpy/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/screenlogicpy/default.nix b/pkgs/development/python-modules/screenlogicpy/default.nix index 100c487acee6..be9cbc6f13eb 100644 --- a/pkgs/development/python-modules/screenlogicpy/default.nix +++ b/pkgs/development/python-modules/screenlogicpy/default.nix @@ -6,12 +6,12 @@ buildPythonPackage rec { pname = "screenlogicpy"; - version = "0.3.0"; + version = "0.4.1"; disabled = pythonOlder "3.6"; src = fetchPypi { inherit pname version; - sha256 = "0gn2mf2n2g1ffdbijrydgb7dgd60lkvckblx6s86kxlkrp1wqgrq"; + sha256 = "sha256-Hj+AS8YN7ZtmgY5sUj4TmQspzeiKiLz6dBbmjhGCgXI="; }; # Project doesn't publish tests From 4ec3123b82d7c4e96ec7f55cdfa27e74be87f108 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Thu, 29 Apr 2021 09:19:38 +0200 Subject: [PATCH 2/2] python3Packages.screenlogicpy: enable tests --- .../python-modules/screenlogicpy/default.nix | 24 +++++++++++++------ 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/pkgs/development/python-modules/screenlogicpy/default.nix b/pkgs/development/python-modules/screenlogicpy/default.nix index be9cbc6f13eb..1713e4c2521f 100644 --- a/pkgs/development/python-modules/screenlogicpy/default.nix +++ b/pkgs/development/python-modules/screenlogicpy/default.nix @@ -1,7 +1,8 @@ { lib , buildPythonPackage -, fetchPypi +, fetchFromGitHub , pythonOlder +, pytestCheckHook }: buildPythonPackage rec { @@ -9,14 +10,23 @@ buildPythonPackage rec { version = "0.4.1"; disabled = pythonOlder "3.6"; - src = fetchPypi { - inherit pname version; - sha256 = "sha256-Hj+AS8YN7ZtmgY5sUj4TmQspzeiKiLz6dBbmjhGCgXI="; + src = fetchFromGitHub { + owner = "dieselrabbit"; + repo = pname; + rev = "v${version}"; + sha256 = "1rmjxqqbkfcv2xz8ilml799bzffls678fvq784fab2xdv595fndd"; }; - # Project doesn't publish tests - # https://github.com/dieselrabbit/screenlogicpy/issues/8 - doCheck = false; + checkInputs = [ + pytestCheckHook + ]; + + disabledTests = [ + # Tests require network access + "test_gateway_discovery" + "test_asyncio_gateway_discovery" + ]; + pythonImportsCheck = [ "screenlogicpy" ]; meta = with lib; {