From e5a4da2ab8687c52d140653cc0fb17e2344f48a6 Mon Sep 17 00:00:00 2001 From: Daiderd Jordan Date: Fri, 12 May 2017 08:36:25 +0200 Subject: [PATCH] python-pytest-xdist: fix tests --- .../python-modules/pytest-xdist/default.nix | 29 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 18 +----------- 2 files changed, 30 insertions(+), 17 deletions(-) create mode 100644 pkgs/development/python-modules/pytest-xdist/default.nix diff --git a/pkgs/development/python-modules/pytest-xdist/default.nix b/pkgs/development/python-modules/pytest-xdist/default.nix new file mode 100644 index 00000000000..05f4d5bd1f2 --- /dev/null +++ b/pkgs/development/python-modules/pytest-xdist/default.nix @@ -0,0 +1,29 @@ +{ stdenv, fetchzip, buildPythonPackage, isPy3k, execnet, pytest, setuptools_scm }: + +buildPythonPackage rec { + name = "${pname}-${version}"; + pname = "pytest-xdist"; + version = "1.14"; + + src = fetchzip { + url = "mirror://pypi/p/pytest-xdist/${name}.zip"; + sha256 = "18j6jq4r47cbbgnci0bbp0kjr9w12hzw7fh4dmsbm072jmv8c0gx"; + }; + + buildInputs = [ pytest setuptools_scm ]; + propagatedBuildInputs = [ execnet ]; + + postPatch = stdenv.lib.optionalString stdenv.isDarwin '' + rm testing/acceptance_test.py testing/test_remote.py testing/test_slavemanage.py + ''; + + checkPhase = '' + py.test + ''; + + meta = with stdenv.lib; { + description = "py.test xdist plugin for distributed testing and loop-on-failing modes"; + homepage = https://github.com/pytest-dev/pytest-xdist; + license = licenses.mit; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index fcef975b048..4093dac55c8 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -5297,23 +5297,7 @@ in { }; }; - pytest_xdist = buildPythonPackage rec { - name = "pytest-xdist-1.14"; - - src = pkgs.fetchurl { - url = "mirror://pypi/p/pytest-xdist/${name}.zip"; - sha256 = "08rn2l39ds60xshs4js787l84pfckksqklfq2wq9x8ig2aci2pja"; - }; - - buildInputs = with self; [ pytest setuptools_scm ]; - propagatedBuildInputs = with self; [ execnet ]; - - meta = { - description = "py.test xdist plugin for distributed testing and loop-on-failing modes"; - homepage = https://github.com/pytest-dev/pytest-xdist; - license = licenses.mit; - }; - }; + pytest_xdist = callPackage ../development/python-modules/pytest-xdist { }; pytest-localserver = buildPythonPackage rec { name = "pytest-localserver-${version}";