From 732633fdff202425e644559bd4b70a76bfd451e9 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Mon, 10 Oct 2022 18:08:57 +0200 Subject: [PATCH] python310Packages.transmission-rpc: enable tests - update disabled --- .../transmission-rpc/default.nix | 41 ++++++++++--------- 1 file changed, 22 insertions(+), 19 deletions(-) diff --git a/pkgs/development/python-modules/transmission-rpc/default.nix b/pkgs/development/python-modules/transmission-rpc/default.nix index 96df7bdbcf3d..b82a61b7518c 100644 --- a/pkgs/development/python-modules/transmission-rpc/default.nix +++ b/pkgs/development/python-modules/transmission-rpc/default.nix @@ -1,50 +1,53 @@ { lib , buildPythonPackage +, fetchFromGitHub , fetchPypi -, six -, typing-extensions +, poetry-core +, pydantic +, pytestCheckHook +, pythonOlder +, pytz , requests , yarl -, pythonOlder -, fetchFromGitHub -, poetry-core }: buildPythonPackage rec { pname = "transmission-rpc"; version = "3.4.0"; - disabled = pythonOlder "3.6"; - format = "pyproject"; + disabled = pythonOlder "3.8"; + src = fetchFromGitHub { owner = "Trim21"; repo = "transmission-rpc"; rev = "refs/tags/v${version}"; - sha256 = "sha256-O+VimSIVsO4P7v+8HHdYujaKpPx4FV8bF/Nn4EHP2vo="; + hash = "sha256-O+VimSIVsO4P7v+8HHdYujaKpPx4FV8bF/Nn4EHP2vo="; }; - # remove once upstream has tagged version with dumped typing-extensions - postPatch = '' - substituteInPlace pyproject.toml \ - --replace 'typing_extensions = ">=3.7.4.2,<4.0.0.0"' 'typing_extensions = "*"' - ''; - nativeBuildInputs = [ poetry-core ]; propagatedBuildInputs = [ - six - typing-extensions + pydantic requests + ]; + + checkInputs = [ + pytz + pytestCheckHook yarl ]; - # no tests - doCheck = false; + pythonImportsCheck = [ + "transmission_rpc" + ]; - pythonImportsCheck = [ "transmission_rpc" ]; + disabledTests = [ + # Tests require a running Transmission instance + "test_real" + ]; meta = with lib; { description = "Python module that implements the Transmission bittorent client RPC protocol";