1{ lib 2, buildPythonPackage 3, fetchPypi 4, pythonOlder 5, setuptools-scm 6, pytestCheckHook 7, filelock 8, execnet 9, pytest 10, psutil 11, setproctitle 12}: 13 14buildPythonPackage rec { 15 pname = "pytest-xdist"; 16 version = "3.3.1"; 17 disabled = pythonOlder "3.7"; 18 19 format = "pyproject"; 20 21 src = fetchPypi { 22 inherit pname version; 23 hash = "sha256-1e4FIOsbe8ylCmClGKt6dweZKBLFeBmPi0T9+seOjJM="; 24 }; 25 26 nativeBuildInputs = [ 27 setuptools-scm 28 ]; 29 30 buildInputs = [ 31 pytest 32 ]; 33 34 propagatedBuildInputs = [ 35 execnet 36 ]; 37 38 nativeCheckInputs = [ 39 filelock 40 pytestCheckHook 41 ]; 42 43 passthru.optional-dependencies = { 44 psutil = [ psutil ]; 45 setproctitle = [ setproctitle ]; 46 }; 47 48 pytestFlagsArray = [ 49 # pytest can already use xdist at this point 50 "--numprocesses=$NIX_BUILD_CORES" 51 ]; 52 53 # access file system 54 disabledTests = [ 55 "test_distribution_rsyncdirs_example" 56 "test_rsync_popen_with_path" 57 "test_popen_rsync_subdir" 58 "test_rsync_report" 59 "test_init_rsync_roots" 60 "test_rsyncignore" 61 # flakey 62 "test_internal_errors_propagate_to_controller" 63 ]; 64 65 setupHook = ./setup-hook.sh; 66 67 meta = with lib; { 68 changelog = "https://github.com/pytest-dev/pytest-xdist/blob/v${version}/CHANGELOG.rst"; 69 description = "Pytest xdist plugin for distributed testing and loop-on-failing modes"; 70 homepage = "https://github.com/pytest-dev/pytest-xdist"; 71 license = licenses.mit; 72 maintainers = with maintainers; [ dotlambda ]; 73 }; 74}