git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #105878 from TredwellGit/pythonPackages.pytest_xdist

pythonPackages.pytest_xdist: fix build

commitcc8b2b360250fe7cfe4cc2d871e183e138554ce7 authorFrederik Rietdijk <freddyrietdijk@fridh.nl> dateSun 6 Dec 2020, 18:04 (6 years ago) parentc94111046714a3
4 files changed+50−51
pkgs/development/python-modules/pytest-xdist/1.nix+36 pkgs/development/python-modules/pytest-xdist/2.nix−33 pkgs/development/python-modules/pytest-xdist/default.nix+10−13 pkgs/top-level/python-packages.nix+4−5
pkgs/development/python-modules/pytest-xdist/1.nixnew file+36
@@ -0,0 +1,36 @@
1+{ stdenv, fetchPypi, buildPythonPackage, execnet, pytest
2+, setuptools_scm, pytest-forked, filelock, psutil, six, isPy3k }:
3+
4+buildPythonPackage rec {
5+ pname = "pytest-xdist";
6+ version = "1.34.0";
7+
8+ src = fetchPypi {
9+ inherit pname version;
10+ sha256 = "1vh4ps32lp5ignch5adbl3pgchvigdfmrl6qpmhxih54wa1qw3il";
11+ };
12+
13+ nativeBuildInputs = [ setuptools_scm pytest ];
14+ checkInputs = [ pytest filelock ];
15+ propagatedBuildInputs = [ execnet pytest-forked psutil six ];
16+
17+ # Encountered a memory leak
18+ # https://github.com/pytest-dev/pytest-xdist/issues/462
19+ doCheck = !isPy3k;
20+
21+ checkPhase = ''
22+ # Excluded tests access file system
23+ py.test testing -k "not test_distribution_rsyncdirs_example \
24+ and not test_rsync_popen_with_path \
25+ and not test_popen_rsync_subdir \
26+ and not test_init_rsync_roots \
27+ and not test_rsyncignore"
28+ '';
29+
30+ meta = with stdenv.lib; {
31+ description = "py.test xdist plugin for distributed testing and loop-on-failing modes";
32+ homepage = "https://github.com/pytest-dev/pytest-xdist";
33+ license = licenses.mit;
34+ maintainers = with maintainers; [ dotlambda ];
35+ };
36+}
pkgs/development/python-modules/pytest-xdist/2.nixdeleted−33
@@ -1,33 +0,0 @@
1−{ stdenv, fetchPypi, buildPythonPackage, execnet, pytest_6
2−, setuptools_scm, pytest-forked, filelock, psutil, six, isPy3k }:
3−
4−buildPythonPackage rec {
5− pname = "pytest-xdist";
6− version = "2.1.0";
7− disabled = !isPy3k;
8−
9− src = fetchPypi {
10− inherit pname version;
11− sha256 = "0wh6pn66nncfs6ay0n863bgyriwsgppn8flx5l7551j1lbqkinc2";
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− # capture_deprecated not compatible with latest pytest6
20− checkPhase = ''
21− # Excluded tests access file system
22− export HOME=$TMPDIR
23− pytest -n $NIX_BUILD_CORES \
24− -k "not (distribution_rsyncdirs_example or rsync or warning_captured_deprecated_in_pytest_6)"
25− '';
26−
27− meta = with stdenv.lib; {
28− description = "py.test xdist plugin for distributed testing and loop-on-failing modes";
29− homepage = "https://github.com/pytest-dev/pytest-xdist";
30− license = licenses.mit;
31− maintainers = with maintainers; [ dotlambda ];
32− };
33−}
pkgs/development/python-modules/pytest-xdist/default.nix+10−13
@@ -1,30 +1,27 @@
1−{ stdenv, fetchPypi, buildPythonPackage, execnet, pytest
1+{ stdenv, fetchPypi, buildPythonPackage, execnet, pytest_6
22, setuptools_scm, pytest-forked, filelock, psutil, six, isPy3k }:
33
44buildPythonPackage rec {
55 pname = "pytest-xdist";
66 version = "2.1.0";
7+ disabled = !isPy3k;
78
89 src = fetchPypi {
910 inherit pname version;
10− sha256 = "82d938f1a24186520e2d9d3a64ef7d9ac7ecdf1a0659e095d18e596b8cbd0672";
11+ sha256 = "0wh6pn66nncfs6ay0n863bgyriwsgppn8flx5l7551j1lbqkinc2";
1112 };
1213
13− nativeBuildInputs = [ setuptools_scm pytest ];
14− checkInputs = [ pytest filelock ];
14+ nativeBuildInputs = [ setuptools_scm pytest_6 ];
15+ checkInputs = [ pytest_6 filelock ];
1516 propagatedBuildInputs = [ execnet pytest-forked psutil six ];
1617
17− # Encountered a memory leak
18− # https://github.com/pytest-dev/pytest-xdist/issues/462
19− doCheck = !isPy3k;
20−
18+ # pytest6 doesn't allow for new lines
19+ # capture_deprecated not compatible with latest pytest6
2120 checkPhase = ''
2221 # Excluded tests access file system
23− py.test testing -k "not test_distribution_rsyncdirs_example \
24− and not test_rsync_popen_with_path \
25− and not test_popen_rsync_subdir \
26− and not test_init_rsync_roots \
27− and not test_rsyncignore"
22+ export HOME=$TMPDIR
23+ pytest -n $NIX_BUILD_CORES \
24+ -k "not (distribution_rsyncdirs_example or rsync or warning_captured_deprecated_in_pytest_6)"
2825 '';
2926
3027 meta = with stdenv.lib; {
pkgs/top-level/python-packages.nix+4−5
@@ -5825,11 +5825,10 @@ in {
58255825
58265826 pytest-watch = callPackage ../development/python-modules/pytest-watch { };
58275827
5828− pytest_xdist_1 = callPackage ../development/python-modules/pytest-xdist { };
5829−
5830− pytest_xdist_2 = callPackage ../development/python-modules/pytest-xdist/2.nix { };
5831−
5832− pytest_xdist = self.pytest_xdist_2;
5828+ pytest_xdist = if isPy27 then
5829+ callPackage ../development/python-modules/pytest-xdist/1.nix { }
5830+ else
5831+ callPackage ../development/python-modules/pytest-xdist { };
58335832
58345833 pytest-xprocess = callPackage ../development/python-modules/pytest-xprocess { };
58355834