depot/third_party/nixpkgs/pkgs/development/python-modules/pytest-xdist/default.nix
Default email 83405b6dd2 Project import generated by Copybara.
GitOrigin-RevId: ac718d02867a84b42522a0ece52d841188208f2c
2023-03-15 17:39:30 +01:00

74 lines
1.5 KiB
Nix

{ lib
, buildPythonPackage
, fetchPypi
, pythonOlder
, setuptools-scm
, pytestCheckHook
, filelock
, execnet
, pytest
, psutil
, setproctitle
}:
buildPythonPackage rec {
pname = "pytest-xdist";
version = "3.2.0";
disabled = pythonOlder "3.7";
format = "pyproject";
src = fetchPypi {
inherit pname version;
hash = "sha256-+hD5WiVkzZFlLy0TJyUYPDtZDZ/c3sCdNnc4bs9MHOk=";
};
nativeBuildInputs = [
setuptools-scm
];
buildInputs = [
pytest
];
propagatedBuildInputs = [
execnet
];
nativeCheckInputs = [
filelock
pytestCheckHook
];
passthru.optional-dependencies = {
psutil = [ psutil ];
setproctitle = [ setproctitle ];
};
pytestFlagsArray = [
# pytest can already use xdist at this point
"--numprocesses=$NIX_BUILD_CORES"
];
# access file system
disabledTests = [
"test_distribution_rsyncdirs_example"
"test_rsync_popen_with_path"
"test_popen_rsync_subdir"
"test_rsync_report"
"test_init_rsync_roots"
"test_rsyncignore"
# flakey
"test_internal_errors_propagate_to_controller"
];
setupHook = ./setup-hook.sh;
meta = with lib; {
changelog = "https://github.com/pytest-dev/pytest-xdist/blob/v${version}/CHANGELOG.rst";
description = "Pytest xdist plugin for distributed testing and loop-on-failing modes";
homepage = "https://github.com/pytest-dev/pytest-xdist";
license = licenses.mit;
maintainers = with maintainers; [ dotlambda ];
};
}