From f9848e661002288427303b05a30d2cb74c9867fc Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Thu, 1 Apr 2021 11:56:38 +0200 Subject: [PATCH 1/2] python3Packages.accuweather: 0.1.0 -> 0.1.1 --- .../python-modules/accuweather/default.nix | 37 ++++++++++--------- 1 file changed, 19 insertions(+), 18 deletions(-) diff --git a/pkgs/development/python-modules/accuweather/default.nix b/pkgs/development/python-modules/accuweather/default.nix index da2feef18c83..01a299c89fde 100644 --- a/pkgs/development/python-modules/accuweather/default.nix +++ b/pkgs/development/python-modules/accuweather/default.nix @@ -1,47 +1,48 @@ { lib -, buildPythonPackage -, fetchFromGitHub -, pythonOlder -, pytestrunner , aiohttp , aioresponses -, pytestCheckHook -, pytestcov +, buildPythonPackage +, fetchFromGitHub , pytest-asyncio +, pytest-error-for-skips +, pytestCheckHook +, pythonOlder }: buildPythonPackage rec { pname = "accuweather"; - version = "0.1.0"; - + version = "0.1.1"; disabled = pythonOlder "3.6"; src = fetchFromGitHub { owner = "bieniu"; repo = pname; rev = version; - sha256 = "0jp2x7fgg1shgr1fx296rni00lmjjmjgg141giljzizgd04dwgy3"; + sha256 = "sha256-fjOwa13hxY8/gCM6TCAFWVmEY1oZyqKyc6o3OSsxHpY="; }; postPatch = '' - # we don't have pytest-error-for-skips packaged - substituteInPlace pytest.ini --replace "--error-for-skips" "" + substituteInPlace setup.py \ + --replace "pytest-runner" "" + substituteInPlace pytest.ini \ + --replace "--cov --cov-report term-missing" "" ''; - nativeBuildInputs = [ pytestrunner ]; - - propagatedBuildInputs = [ aiohttp ]; + propagatedBuildInputs = [ + aiohttp + ]; checkInputs = [ aioresponses - pytestCheckHook - pytestcov pytest-asyncio + pytest-error-for-skips + pytestCheckHook ]; + pythonImportsCheck = [ "accuweather" ]; + meta = with lib; { - description = - "Python wrapper for getting weather data from AccuWeather servers."; + description = "Python wrapper for getting weather data from AccuWeather servers"; homepage = "https://github.com/bieniu/accuweather"; license = licenses.asl20; maintainers = with maintainers; [ jamiemagee ]; From bfbfc1e87c703567b5edecd6d2f6728e2b50d322 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Thu, 1 Apr 2021 11:57:16 +0200 Subject: [PATCH 2/2] home-assistant: enable accuweather 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 e667378af5b3..efe7ab2088f9 100644 --- a/pkgs/servers/home-assistant/default.nix +++ b/pkgs/servers/home-assistant/default.nix @@ -176,6 +176,7 @@ in with py.pkgs; buildPythonApplication rec { # services. Before adding new components to this list make sure we have all # its dependencies packaged and listed in ./component-packages.nix. componentTests = [ + "accuweather" "alert" "api" "auth"