From 5fb2b84a1f42bd21e601a11e62dff40e37ef18f4 Mon Sep 17 00:00:00 2001 From: Pyrox Date: Sun, 28 Jul 2024 23:34:19 -0400 Subject: [PATCH 1/2] python312Packages.envs: Drop nose dependency --- .../python-modules/envs/default.nix | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) diff --git a/pkgs/development/python-modules/envs/default.nix b/pkgs/development/python-modules/envs/default.nix index c64f607795ba4fd..7656c5b56ec82de 100644 --- a/pkgs/development/python-modules/envs/default.nix +++ b/pkgs/development/python-modules/envs/default.nix @@ -4,8 +4,7 @@ click, fetchPypi, jinja2, - mock, - nose, + pytestCheckHook, poetry-core, pythonOlder, terminaltables, @@ -31,21 +30,11 @@ buildPythonPackage rec { terminaltables ]; - # test rely on nose - doCheck = pythonOlder "3.12"; + nativeCheckInputs = [ pytestCheckHook ]; - nativeCheckInputs = [ - mock - nose - ]; - - checkPhase = '' - runHook preCheck - - nosetests --with-isolation + pytestFlagsArray = [ "envs/tests.py" ]; - runHook postCheck - ''; + disabledTests = [ "test_list_envs" ]; pythonImportsCheck = [ "envs" ]; From 5dc703c75cb7652cd651a1f0b880cf6d83eb2cc5 Mon Sep 17 00:00:00 2001 From: Pyrox Date: Sun, 28 Jul 2024 23:34:49 -0400 Subject: [PATCH 2/2] python312Packages.envs: modernize --- pkgs/development/python-modules/envs/default.nix | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/pkgs/development/python-modules/envs/default.nix b/pkgs/development/python-modules/envs/default.nix index 7656c5b56ec82de..10fc95fbb13b463 100644 --- a/pkgs/development/python-modules/envs/default.nix +++ b/pkgs/development/python-modules/envs/default.nix @@ -6,7 +6,6 @@ jinja2, pytestCheckHook, poetry-core, - pythonOlder, terminaltables, }: @@ -15,16 +14,14 @@ buildPythonPackage rec { version = "1.4"; pyproject = true; - disabled = pythonOlder "3.7"; - src = fetchPypi { inherit pname version; hash = "sha256-nYQ1xphdHN1oKZ4ExY4r24rmz2ayWWqAeeb5qT8qA5g="; }; - nativeBuildInputs = [ poetry-core ]; + build-system = [ poetry-core ]; - propagatedBuildInputs = [ + dependencies = [ click jinja2 terminaltables @@ -38,11 +35,11 @@ buildPythonPackage rec { pythonImportsCheck = [ "envs" ]; - meta = with lib; { + meta = { description = "Easy access to environment variables from Python"; mainProgram = "envs"; homepage = "https://github.com/capless/envs"; - license = licenses.asl20; - maintainers = with maintainers; [ peterhoeg ]; + license = lib.licenses.asl20; + maintainers = with lib.maintainers; [ peterhoeg ]; }; }