Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{ stdenv, fetchPypi, buildPythonPackage, execnet, pytest_6 2, setuptools_scm, pytest-forked, filelock, psutil, six, isPy3k }: 3 4buildPythonPackage rec { 5 pname = "pytest-xdist"; 6 version = "2.0.0"; 7 disabled = !isPy3k; 8 9 src = fetchPypi { 10 inherit pname version; 11 sha256 = "3217b1f40290570bf27b1f82714fc4ed44c3260ba9b2f6cde0372378fc707ad3"; 12 }; 13 14 nativeBuildInputs = [ setuptools_scm pytest_6 ]; 15 checkInputs = [ pytest_6 filelock ]; 16 propagatedBuildInputs = [ execnet pytest-forked psutil six ]; 17 18 # pytest6 doesn't allow for new lines 19 checkPhase = '' 20 # Excluded tests access file system 21 export HOME=$TMPDIR 22 pytest -n $NIX_BUILD_CORES -k "not (distribution_rsyncdirs_example or rsync)" 23 ''; 24 25 meta = with stdenv.lib; { 26 description = "py.test xdist plugin for distributed testing and loop-on-failing modes"; 27 homepage = "https://github.com/pytest-dev/pytest-xdist"; 28 license = licenses.mit; 29 maintainers = with maintainers; [ dotlambda ]; 30 }; 31}