nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at python-updates 74 lines 1.7 kB view raw
1{ 2 lib, 3 stdenv, 4 buildPythonPackage, 5 pythonAtLeast, 6 fetchFromGitHub, 7 fetchpatch2, 8 setuptools, 9 setuptools-scm, 10 wheel, 11 py, 12 pytest, 13 pytestCheckHook, 14}: 15 16buildPythonPackage rec { 17 pname = "pytest-forked"; 18 version = "1.6.0"; 19 20 pyproject = true; 21 22 src = fetchFromGitHub { 23 owner = "pytest-dev"; 24 repo = "pytest-forked"; 25 tag = "v${version}"; 26 hash = "sha256-owkGwF5WQ17/CXwTsIYJ2AgktekRB4qhtsDxR0LCI/k="; 27 }; 28 29 patches = [ 30 (fetchpatch2 { 31 # https://github.com/pytest-dev/pytest-forked/actions 32 name = "pytest8-compat.patch"; 33 url = "https://github.com/pytest-dev/pytest-forked/commit/b2742322d39ebda97d5170922520f3bb9c73f614.patch"; 34 hash = "sha256-tTRW0p3tOotQMtjjJ6RUKdynsAnKRz0RAV8gAUHiNNA="; 35 }) 36 # https://github.com/pytest-dev/pytest-forked/pull/96 37 ./pytest9-compat.patch 38 ]; 39 40 nativeBuildInputs = [ 41 setuptools 42 setuptools-scm 43 wheel 44 ]; 45 46 buildInputs = [ pytest ]; 47 48 propagatedBuildInputs = [ py ]; 49 50 nativeCheckInputs = [ 51 py 52 pytestCheckHook 53 ]; 54 55 disabledTests = 56 if (pythonAtLeast "3.12" && stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isx86_64) then 57 [ 58 # non reproducible test failure on hydra, works on community builder 59 # https://hydra.nixos.org/build/252537267 60 "test_xfail" 61 ] 62 else 63 null; 64 65 setupHook = ./setup-hook.sh; 66 67 meta = { 68 changelog = "https://github.com/pytest-dev/pytest-forked/blob/${src.rev}/CHANGELOG.rst"; 69 description = "Run tests in isolated forked subprocesses"; 70 homepage = "https://github.com/pytest-dev/pytest-forked"; 71 license = lib.licenses.mit; 72 maintainers = with lib.maintainers; [ dotlambda ]; 73 }; 74}