From edcfe3f6b979a10feb6485b81ad592d3ac4fba45 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Mon, 20 Feb 2023 10:58:33 +0100 Subject: [PATCH] python310Packages.mocket: add changelog to meta python310Packages.mocket: disable on unsupported Python releases python310Packages.mocket: add optional-dependencies --- .../python-modules/mocket/default.nix | 20 ++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/pkgs/development/python-modules/mocket/default.nix b/pkgs/development/python-modules/mocket/default.nix index c36747d3ddc7..3e2294bfd564 100644 --- a/pkgs/development/python-modules/mocket/default.nix +++ b/pkgs/development/python-modules/mocket/default.nix @@ -17,16 +17,19 @@ , requests , sure , pook +, pythonOlder }: buildPythonPackage rec { pname = "mocket"; version = "3.10.9"; - disabled = !isPy3k; + format = "setuptools"; + + disabled = pythonOlder "3.7"; src = fetchPypi { inherit pname version; - sha256 = "sha256-fAVw5WvpJOITQWqA8Y6Xi7QbaunZ1WGXxAuUMXbh+Aw="; + hash = "sha256-fAVw5WvpJOITQWqA8Y6Xi7QbaunZ1WGXxAuUMXbh+Aw="; }; propagatedBuildInputs = [ @@ -36,6 +39,12 @@ buildPythonPackage rec { urllib3 ]; + passthru.optional-dependencies = { + pook = [ + pook + ]; + }; + nativeCheckInputs = [ pytestCheckHook pytest-mock @@ -46,11 +55,11 @@ buildPythonPackage rec { redis requests sure - pook - ]; + ] ++ passthru.optional-dependencies.pook; # skip http tests SKIP_TRUE_HTTP = true; + pytestFlagsArray = [ # Requires a live Redis instance "--ignore=tests/main/test_redis.py" @@ -77,8 +86,9 @@ buildPythonPackage rec { pythonImportsCheck = [ "mocket" ]; meta = with lib; { - description = "A socket mock framework - for all kinds of socket animals, web-clients included"; + description = "A socket mock framework for all kinds of sockets including web-clients"; homepage = "https://github.com/mindflayer/python-mocket"; + changelog = "https://github.com/mindflayer/python-mocket/releases/tag/${version}"; license = licenses.bsd3; maintainers = with maintainers; [ hexa ]; };