From 9295cc28c9c38430b14894f3912d70d3aecdf84a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Tue, 27 Dec 2022 15:49:22 +0100 Subject: [PATCH 1/3] python3Packages.pytest-tap: init at 3.3 --- maintainers/maintainer-list.nix | 9 +++++ .../python-modules/pytest-tap/default.nix | 38 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 3 files changed, 49 insertions(+) create mode 100644 pkgs/development/python-modules/pytest-tap/default.nix diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index 9fb4956ac2d2..e27ed8356a59 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -3019,6 +3019,15 @@ githubId = 16950437; name = "cwyc"; }; + cynerd = { + name = "Karel Kočí"; + email = "cynerd@email.cz"; + github = "Cynerd"; + githubId = 3811900; + keys = [{ + fingerprint = "2B1F 70F9 5F1B 48DA 2265 A7FA A6BC 8B8C EB31 659B"; + }]; + }; cyounkins = { name = "Craig Younkins"; email = "cyounkins@gmail.com"; diff --git a/pkgs/development/python-modules/pytest-tap/default.nix b/pkgs/development/python-modules/pytest-tap/default.nix new file mode 100644 index 000000000000..10830fdec690 --- /dev/null +++ b/pkgs/development/python-modules/pytest-tap/default.nix @@ -0,0 +1,38 @@ +{ lib +, buildPythonPackage +, fetchFromGitHub +, pythonOlder +, pytest +, tappy +, pytestCheckHook +}: + +buildPythonPackage rec { + pname = "pytest-tap"; + version = "3.3"; + disabled = pythonOlder "3.6"; + + src = fetchFromGitHub { + owner = "python-tap"; + repo = "pytest-tap"; + rev = "v${version}"; + sha256 = "R0RSdKTyJYGq+x0+ut4pJEywTGNgGp/ps36ZaH5dyY4="; + }; + + buildInputs = [ pytest ]; + propagatedBuildInputs = [ tappy ]; + + checkInputs = [ pytestCheckHook ]; + disabledTests = [ + # Fixed in 4ed0138bf659c348b6dfb8bb701ae1989625d3d8 and hopefully in next release + "test_unittest_expected_failure" + ]; + + meta = with lib; { + description = "Test Anything Protocol (TAP) reporting plugin for pytest"; + homepage = "https://github.com/python-tap/pytest-tap"; + changelog = "https://github.com/python-tap/pytest-tap/blob/v${version}/docs/releases.rst"; + license = licenses.bsd2; + maintainers = with maintainers; [ cynerd ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 4ca17accf532..cc3a5f96ea11 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -8982,6 +8982,8 @@ self: super: with self; { pytest-sugar = callPackage ../development/python-modules/pytest-sugar { }; + pytest-tap = callPackage ../development/python-modules/pytest-tap { }; + pytest-test-utils = callPackage ../development/python-modules/pytest-test-utils { }; pytest-testmon = callPackage ../development/python-modules/pytest-testmon { }; From 517ff272eed82b22e3621b7e9a0b9367fb6adf35 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 31 Dec 2022 13:44:46 +0100 Subject: [PATCH 2/3] python3Packages.pytest-tap: add pythonImportsCheck --- .../python-modules/pytest-tap/default.nix | 20 ++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/pkgs/development/python-modules/pytest-tap/default.nix b/pkgs/development/python-modules/pytest-tap/default.nix index 10830fdec690..8b935c4f91f0 100644 --- a/pkgs/development/python-modules/pytest-tap/default.nix +++ b/pkgs/development/python-modules/pytest-tap/default.nix @@ -10,6 +10,8 @@ buildPythonPackage rec { pname = "pytest-tap"; version = "3.3"; + format = "setuptools"; + disabled = pythonOlder "3.6"; src = fetchFromGitHub { @@ -19,15 +21,27 @@ buildPythonPackage rec { sha256 = "R0RSdKTyJYGq+x0+ut4pJEywTGNgGp/ps36ZaH5dyY4="; }; - buildInputs = [ pytest ]; - propagatedBuildInputs = [ tappy ]; + buildInputs = [ + pytest + ]; + + propagatedBuildInputs = [ + tappy + ]; + + checkInputs = [ + pytestCheckHook + ]; - checkInputs = [ pytestCheckHook ]; disabledTests = [ # Fixed in 4ed0138bf659c348b6dfb8bb701ae1989625d3d8 and hopefully in next release "test_unittest_expected_failure" ]; + pythonImportsCheck = + "pytest_tap" + ]; + meta = with lib; { description = "Test Anything Protocol (TAP) reporting plugin for pytest"; homepage = "https://github.com/python-tap/pytest-tap"; From 63a687ad75da4e75d7342d522137c3d11cbcb1ad Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sat, 31 Dec 2022 13:46:59 +0100 Subject: [PATCH 3/3] python310Packages.pytest-tap: fix copy-&-paste error --- pkgs/development/python-modules/pytest-tap/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/pytest-tap/default.nix b/pkgs/development/python-modules/pytest-tap/default.nix index 8b935c4f91f0..dd545a5b6dd6 100644 --- a/pkgs/development/python-modules/pytest-tap/default.nix +++ b/pkgs/development/python-modules/pytest-tap/default.nix @@ -38,7 +38,7 @@ buildPythonPackage rec { "test_unittest_expected_failure" ]; - pythonImportsCheck = + pythonImportsCheck = [ "pytest_tap" ];