depot/third_party/nixpkgs/pkgs/development/python-modules/pytest-xdist/default.nix
Default email f34ce41345 Project import generated by Copybara.
GitOrigin-RevId: b73c2221a46c13557b1b3be9c2070cc42cf01eb3
2024-07-27 08:49:29 +02:00

76 lines
1.6 KiB
Nix

{
lib,
buildPythonPackage,
fetchPypi,
pythonOlder,
setuptools,
setuptools-scm,
pytestCheckHook,
filelock,
execnet,
pytest,
psutil,
setproctitle,
}:
buildPythonPackage rec {
pname = "pytest-xdist";
version = "3.6.1";
disabled = pythonOlder "3.7";
pyproject = true;
src = fetchPypi {
pname = "pytest_xdist";
inherit version;
hash = "sha256-6tFWpNsjHux2lzf1dmjvWKIISjSy5VxKj6INhhEHMA0=";
};
build-system = [
setuptools
setuptools-scm
];
buildInputs = [ pytest ];
dependencies = [ execnet ];
nativeCheckInputs = [
filelock
pytestCheckHook
];
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"
# https://github.com/pytest-dev/pytest-xdist/issues/985
"test_workqueue_ordered_by_size"
];
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 ];
};
}