nixpkgs/pkgs/development/python-modules/pytest-subprocess/default.nix
Robert Schütz 1a04744f74 treewide: remove superfluous disabled
There is no need to disable Python packages for Python versions that are
no longer in Nixpkgs.
This change was generated using the following script:

    pattern='^\s*disabled\s*=\s*pythonOlder\s*"3\.\([0-9]\|10\)"\s*;\s*$'
    for f in $(find -name '*.nix'); do
        grep -q "$pattern" "$f" || continue
        sed -i "/$pattern/d" "$f"
        if [ $(grep -c pythonOlder "$f") == 1 ]; then
            sed -i '/^\s*pythonOlder,\s*$/d' "$f"
        fi
        nixfmt "$f"
    done
2026-01-11 09:34:20 -08:00

63 lines
1.4 KiB
Nix

{
lib,
buildPythonPackage,
fetchFromGitHub,
pythonAtLeast,
fetchpatch,
setuptools,
pytest,
pytestCheckHook,
docutils,
pygments,
pytest-rerunfailures,
pytest-asyncio,
anyio,
typing-extensions,
}:
buildPythonPackage rec {
pname = "pytest-subprocess";
version = "1.5.3";
pyproject = true;
src = fetchFromGitHub {
owner = "aklajnert";
repo = "pytest-subprocess";
tag = version;
hash = "sha256-3vBYOk/P78NOjAbs3fT6py5QOOK3fX+AKtO4j5vxZfk=";
};
patches = lib.optionals (pythonAtLeast "3.13") [
(fetchpatch {
# python 3.14 compat
# the patch however breaks 3.12:
# https://github.com/aklajnert/pytest-subprocess/issues/192
url = "https://github.com/aklajnert/pytest-subprocess/commit/be30d9a94ba45afb600717e3fcd95b8b2ff2c60e.patch";
hash = "sha256-TYk/Zu2MF+ROEKTgZI1rzA2MlW2it++xElfGZS0Dn5s=";
})
];
build-system = [ setuptools ];
buildInputs = [ pytest ];
nativeCheckInputs = [
pytestCheckHook
docutils
pygments
pytest-rerunfailures
pytest-asyncio
anyio
typing-extensions
];
pytestFlags = [ "-Wignore::DeprecationWarning" ];
meta = {
description = "Plugin to fake subprocess for pytest";
homepage = "https://github.com/aklajnert/pytest-subprocess";
changelog = "https://github.com/aklajnert/pytest-subprocess/blob/${src.tag}/HISTORY.rst";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ dotlambda ];
};
}