From 0ac6d4a584ffe94a3c3d40924e75f8df8f317c66 Mon Sep 17 00:00:00 2001 From: natsukium Date: Tue, 16 May 2023 18:38:15 +0900 Subject: [PATCH 1/4] python3Packages.lazy_import: fix tests `pytest --boxed` has been removed from pytest-xdist --- .../python-modules/lazy_import/default.nix | 21 ++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/pkgs/development/python-modules/lazy_import/default.nix b/pkgs/development/python-modules/lazy_import/default.nix index 00766ffc1db..0329f1de2b4 100644 --- a/pkgs/development/python-modules/lazy_import/default.nix +++ b/pkgs/development/python-modules/lazy_import/default.nix @@ -1,6 +1,8 @@ { lib, buildPythonPackage, fetchPypi -, pytest -, pytest-xdist +, pytestCheckHook +, pytest-forked +, py +, python , six }: buildPythonPackage rec { @@ -13,19 +15,24 @@ buildPythonPackage rec { }; nativeCheckInputs = [ - pytest - pytest-xdist + pytestCheckHook + pytest-forked + py ]; propagatedBuildInputs = [ six ]; - checkPhase = '' - cd lazy_import - pytest --boxed + preCheck = '' + # avoid AttributeError: module 'py' has no attribute 'process' + export PYTHONPATH=${py}/${python.sitePackages}:$PYTHONPATH ''; + pytestFlagsArray = [ + "--forked" + ]; + meta = with lib; { description = "lazy_import provides a set of functions that load modules, and related attributes, in a lazy fashion."; homepage = "https://github.com/mnmelo/lazy_import"; From 7bfd10ba7bd7698584af45afcb8748d8c2ff7197 Mon Sep 17 00:00:00 2001 From: natsukium Date: Tue, 16 May 2023 18:48:11 +0900 Subject: [PATCH 2/4] python3Packages.lazy_import: update license --- pkgs/development/python-modules/lazy_import/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/lazy_import/default.nix b/pkgs/development/python-modules/lazy_import/default.nix index 0329f1de2b4..d1554f26c3d 100644 --- a/pkgs/development/python-modules/lazy_import/default.nix +++ b/pkgs/development/python-modules/lazy_import/default.nix @@ -36,7 +36,7 @@ buildPythonPackage rec { meta = with lib; { description = "lazy_import provides a set of functions that load modules, and related attributes, in a lazy fashion."; homepage = "https://github.com/mnmelo/lazy_import"; - license = licenses.gpl3; + license = licenses.gpl3Plus; maintainers = [ maintainers.marenz ]; }; } From 750f3d6b94a6b4e27d2269ab2705454cb4f708f4 Mon Sep 17 00:00:00 2001 From: natsukium Date: Tue, 16 May 2023 18:50:40 +0900 Subject: [PATCH 3/4] python3Packages.lazy_import: update description --- pkgs/development/python-modules/lazy_import/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/lazy_import/default.nix b/pkgs/development/python-modules/lazy_import/default.nix index d1554f26c3d..997cc64ecba 100644 --- a/pkgs/development/python-modules/lazy_import/default.nix +++ b/pkgs/development/python-modules/lazy_import/default.nix @@ -34,7 +34,7 @@ buildPythonPackage rec { ]; meta = with lib; { - description = "lazy_import provides a set of functions that load modules, and related attributes, in a lazy fashion."; + description = "A set of functions that load modules, and related attributes, in a lazy fashion"; homepage = "https://github.com/mnmelo/lazy_import"; license = licenses.gpl3Plus; maintainers = [ maintainers.marenz ]; From 748d0ba77f898a3db27edddf25be8083d7fd3e8d Mon Sep 17 00:00:00 2001 From: natsukium Date: Wed, 17 May 2023 00:37:30 +0900 Subject: [PATCH 4/4] python3Packages.lazy_import: drop marenz as maintainer --- pkgs/development/python-modules/lazy_import/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/lazy_import/default.nix b/pkgs/development/python-modules/lazy_import/default.nix index 997cc64ecba..f3812f0723d 100644 --- a/pkgs/development/python-modules/lazy_import/default.nix +++ b/pkgs/development/python-modules/lazy_import/default.nix @@ -37,6 +37,6 @@ buildPythonPackage rec { description = "A set of functions that load modules, and related attributes, in a lazy fashion"; homepage = "https://github.com/mnmelo/lazy_import"; license = licenses.gpl3Plus; - maintainers = [ maintainers.marenz ]; + maintainers = [ ]; }; }