From 283500ede38216fd0ec331d552ab7bf2198252be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Fri, 6 May 2022 01:39:36 +0200 Subject: [PATCH 1/2] python310Packages.func-timeout: init at 4.3.5 --- .../python-modules/func-timeout/default.nix | 29 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 ++ 2 files changed, 31 insertions(+) create mode 100644 pkgs/development/python-modules/func-timeout/default.nix diff --git a/pkgs/development/python-modules/func-timeout/default.nix b/pkgs/development/python-modules/func-timeout/default.nix new file mode 100644 index 000000000000..f20f5dde8b4b --- /dev/null +++ b/pkgs/development/python-modules/func-timeout/default.nix @@ -0,0 +1,29 @@ +{ lib +, buildPythonPackage +, fetchPypi +, pytestCheckHook +}: + +buildPythonPackage rec { + pname = "func-timeout"; + version = "4.3.5"; + + src = fetchPypi { + pname = "func_timeout"; + inherit version; + sha256 = "74cd3c428ec94f4edfba81f9b2f14904846d5ffccc27c92433b8b5939b5575dd"; + }; + + checkInputs = [ + pytestCheckHook + ]; + + pythonImportsCheck = [ "func_timeout" ]; + + meta = with lib; { + description = "Allows you to specify timeouts when calling any existing function. Also provides support for stoppable-threads"; + homepage = "https://github.com/kata198/func_timeout"; + license = licenses.lgpl3Only; + maintainers = with maintainers; [ SuperSandro2000 ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 50ed104cbe80..52a7e7eb06fd 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -3215,6 +3215,8 @@ in { ftputil = callPackage ../development/python-modules/ftputil { }; + func-timeout = callPackage ../development/python-modules/func-timeout { }; + funcparserlib = callPackage ../development/python-modules/funcparserlib { }; funcsigs = callPackage ../development/python-modules/funcsigs { }; From 34a388a7ddf77579a6030c679a8b6cff8549e48c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Fri, 6 May 2022 01:39:19 +0200 Subject: [PATCH 2/2] python310Packages.zipp: adopt, execute tests --- .../python-modules/zipp/default.nix | 22 ++++++++++++------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/pkgs/development/python-modules/zipp/default.nix b/pkgs/development/python-modules/zipp/default.nix index 0f64df2a56ac..253962910acb 100644 --- a/pkgs/development/python-modules/zipp/default.nix +++ b/pkgs/development/python-modules/zipp/default.nix @@ -1,12 +1,13 @@ { lib , buildPythonPackage , fetchPypi -, more-itertools +, func-timeout +, jaraco_itertools , pythonOlder , setuptools-scm }: -buildPythonPackage rec { +let zipp = buildPythonPackage rec { pname = "zipp"; version = "3.7.0"; format = "setuptools"; @@ -22,21 +23,26 @@ buildPythonPackage rec { setuptools-scm ]; - propagatedBuildInputs = [ - more-itertools - ]; - # Prevent infinite recursion with pytest doCheck = false; + checkInputs = [ + func-timeout + jaraco_itertools + ]; + pythonImportsCheck = [ "zipp" ]; + passthru.tests = { + check = zipp.overridePythonAttrs (_: { doCheck = true; }); + }; + meta = with lib; { description = "Pathlib-compatible object wrapper for zip files"; homepage = "https://github.com/jaraco/zipp"; license = licenses.mit; - maintainers = with maintainers; [ ]; + maintainers = with maintainers; [ SuperSandro2000 ]; }; -} +}; in zipp