From ece3282c7bcc00fd868a17ba3ab27860645ee6cf Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Sun, 6 Mar 2022 19:37:13 +0100 Subject: [PATCH] python3Packages.cattrs: use pytest-xdist Upstream uses it as well and it cuts the complete build down from ~14 minutes to ~1m30s. --- pkgs/development/python-modules/cattrs/default.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkgs/development/python-modules/cattrs/default.nix b/pkgs/development/python-modules/cattrs/default.nix index 7d3efc9fb3b3..94a357df98be 100644 --- a/pkgs/development/python-modules/cattrs/default.nix +++ b/pkgs/development/python-modules/cattrs/default.nix @@ -7,6 +7,7 @@ , motor , msgpack , poetry-core +, pytest-xdist , pytestCheckHook , pythonOlder , pyyaml @@ -44,12 +45,17 @@ buildPythonPackage rec { immutables motor msgpack + pytest-xdist pytestCheckHook pyyaml tomlkit ujson ]; + pytestFlagsArray = [ + "--numprocesses $NIX_BUILD_CORES" + ]; + postPatch = '' substituteInPlace pyproject.toml \ --replace "-l --benchmark-sort=fullname --benchmark-warmup=true --benchmark-warmup-iterations=5 --benchmark-group-by=fullname" "" \