1{ lib 2, buildPythonPackage 3, fetchPypi 4, pythonOlder 5, setuptools-scm 6, pytestCheckHook 7, filelock 8, execnet 9, pytest 10, pytest-forked 11, psutil 12, pexpect 13}: 14 15buildPythonPackage rec { 16 pname = "pytest-xdist"; 17 version = "2.5.0"; 18 disabled = pythonOlder "3.6"; 19 20 src = fetchPypi { 21 inherit pname version; 22 sha256 = "sha256-RYDeyj/wTdsqxT66Oddstd1e3qwFDLb7x2iw3XErTt8="; 23 }; 24 25 nativeBuildInputs = [ setuptools-scm ]; 26 buildInputs = [ 27 pytest 28 ]; 29 checkInputs = [ pytestCheckHook filelock pexpect ]; 30 propagatedBuildInputs = [ execnet pytest-forked psutil ]; 31 32 pytestFlagsArray = [ 33 # pytest can already use xdist at this point 34 "--numprocesses=$NIX_BUILD_CORES" 35 "--forked" 36 ]; 37 38 # access file system 39 disabledTests = [ 40 "test_distribution_rsyncdirs_example" 41 "test_rsync_popen_with_path" 42 "test_popen_rsync_subdir" 43 "test_rsync_report" 44 "test_init_rsync_roots" 45 "test_rsyncignore" 46 # flakey 47 "test_internal_errors_propagate_to_controller" 48 ]; 49 50 setupHook = ./setup-hook.sh; 51 52 meta = with lib; { 53 description = "Pytest xdist plugin for distributed testing and loop-on-failing modes"; 54 homepage = "https://github.com/pytest-dev/pytest-xdist"; 55 license = licenses.mit; 56 maintainers = with maintainers; [ dotlambda ]; 57 }; 58}