From f5419112b3d8e5a34446bbd426a1d168feb0fb91 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Mon, 24 Aug 2026 21:41:44 +0200 Subject: [PATCH] python3Packages.scripttest: 2.0.post1 -> 3.0 Changelog: https://github.com/pypa/scripttest/releases/tag/3.0 --- .../python-modules/scripttest/default.nix | 32 ++++++++++++------- 1 file changed, 20 insertions(+), 12 deletions(-) diff --git a/pkgs/development/python-modules/scripttest/default.nix b/pkgs/development/python-modules/scripttest/default.nix index 9fd6b8e88c28..4a95ca94cb99 100644 --- a/pkgs/development/python-modules/scripttest/default.nix +++ b/pkgs/development/python-modules/scripttest/default.nix @@ -1,29 +1,37 @@ { lib, buildPythonPackage, - fetchPypi, + fetchFromGitHub, + flit-core, pytest, + pytestCheckHook, }: -buildPythonPackage rec { +buildPythonPackage (finalAttrs: { pname = "scripttest"; - version = "2.0.post1"; - format = "setuptools"; + version = "3.0"; + pyproject = true; - src = fetchPypi { - inherit pname version; - sha256 = "sha256-pgZ/H+rfSy7T5ZSwsy5BWJZA5/o5dHZapj1QhSDAv9w="; + src = fetchFromGitHub { + owner = "pypa"; + repo = "scripttest"; + tag = finalAttrs.version; + hash = "sha256-2mM+d7ZudiqxRjqbOKR4mUiv1hdS+hm26sxu05yMY48="; }; + build-system = [ flit-core ]; + buildInputs = [ pytest ]; - # Tests are not included. See https://github.com/pypa/scripttest/issues/11 - doCheck = false; + nativeCheckInputs = [ pytestCheckHook ]; + + pythonImportsCheck = [ "scripttest" ]; meta = { description = "Library for testing interactive command-line applications"; - homepage = "https://pypi.org/project/scripttest/"; - maintainers = [ ]; + homepage = "https://github.com/pypa/scripttest/"; + changelog = "https://github.com/pypa/scripttest/releases/tag/${finalAttrs.src.tag}"; license = lib.licenses.mit; + maintainers = [ ]; }; -} +})