From c8fa27ea0074b2056e04829df6ddbc20cfdd7088 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Sat, 28 May 2022 04:01:35 +0000 Subject: [PATCH 1/2] python310Packages.pysqueezebox: 0.5.5 -> 0.6.0 --- pkgs/development/python-modules/pysqueezebox/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/pysqueezebox/default.nix b/pkgs/development/python-modules/pysqueezebox/default.nix index 8445f6d7e89e..17d69ac467da 100644 --- a/pkgs/development/python-modules/pysqueezebox/default.nix +++ b/pkgs/development/python-modules/pysqueezebox/default.nix @@ -2,12 +2,12 @@ buildPythonPackage rec { pname = "pysqueezebox"; - version = "0.5.5"; + version = "0.6.0"; disabled = pythonOlder "3.6"; src = fetchPypi { inherit pname version; - sha256 = "93e6a3824b560d4ea2b2e5f0a67fdf3b309b6194fbf9927e44fc0d12c7fdc6c0"; + sha256 = "sha256-qc6ffWk62EF+IOLb2XVWtDrrZ0LVs7VtxJG1qrrUPPg="; }; propagatedBuildInputs = [ From 254d2ff6a125dd99175c52f24282d76c81f21ab7 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 28 May 2022 11:09:20 +0200 Subject: [PATCH 2/2] python310Packages.pysqueezebox: enable tests --- .../python-modules/pysqueezebox/default.nix | 35 +++++++++++++++---- 1 file changed, 28 insertions(+), 7 deletions(-) diff --git a/pkgs/development/python-modules/pysqueezebox/default.nix b/pkgs/development/python-modules/pysqueezebox/default.nix index 17d69ac467da..67344d8a5744 100644 --- a/pkgs/development/python-modules/pysqueezebox/default.nix +++ b/pkgs/development/python-modules/pysqueezebox/default.nix @@ -1,22 +1,43 @@ -{ lib, fetchPypi, buildPythonPackage, pythonOlder, aiohttp }: +{ lib +, aiohttp +, buildPythonPackage +, fetchFromGitHub +, pytest-asyncio +, pytestCheckHook +, pythonOlder +}: buildPythonPackage rec { pname = "pysqueezebox"; version = "0.6.0"; + format = "setuptools"; + disabled = pythonOlder "3.6"; - src = fetchPypi { - inherit pname version; - sha256 = "sha256-qc6ffWk62EF+IOLb2XVWtDrrZ0LVs7VtxJG1qrrUPPg="; + src = fetchFromGitHub { + owner = "rajlaud"; + repo = pname; + rev = "v${version}"; + hash = "sha256-0ArKVRy4H0NWShlQMziKvbHp9OjpAkEKp4zrvpVlXOk="; }; propagatedBuildInputs = [ aiohttp ]; - # No tests in the Pypi distribution - doCheck = false; - pythonImportsCheck = [ "pysqueezebox" ]; + checkInputs = [ + pytest-asyncio + pytestCheckHook + ]; + + pythonImportsCheck = [ + "pysqueezebox" + ]; + + disabledTestPaths = [ + # Tests require network access + "tests/test_integration.py" + ]; meta = with lib; { description = "Asynchronous library to control Logitech Media Server";