diff --git a/pkgs/development/python-modules/nose/default.nix b/pkgs/development/python-modules/nose/default.nix new file mode 100644 index 00000000000..bec5156d22e --- /dev/null +++ b/pkgs/development/python-modules/nose/default.nix @@ -0,0 +1,33 @@ +{ stdenv +, buildPythonPackage +, fetchPypi +, python +, coverage +}: + +buildPythonPackage rec { + version = "1.3.7"; + pname = "nose"; + + src = fetchPypi { + inherit pname version; + sha256 = "f1bffef9cbc82628f6e7d7b40d7e255aefaa1adb6a1b1d26c69a8b79e6208a98"; + }; + + propagatedBuildInputs = [ coverage ]; + + doCheck = false; # lot's of transient errors, too much hassle + checkPhase = if python.is_py3k or false then '' + ${python}/bin/${python.executable} setup.py build_tests + '' else "" + '' + rm functional_tests/test_multiprocessing/test_concurrent_shared.py* # see https://github.com/nose-devs/nose/commit/226bc671c73643887b36b8467b34ad485c2df062 + ${python}/bin/${python.executable} selftest.py + ''; + + meta = with stdenv.lib; { + description = "A unittest-based testing framework for python that makes writing and running tests easier"; + homepage = http://readthedocs.org/docs/nose/; + license = licenses.lgpl3; + }; + +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 849488a0884..a30033615df 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -2977,29 +2977,7 @@ in { nodeenv = callPackage ../development/python-modules/nodeenv { }; - nose = buildPythonPackage rec { - version = "1.3.7"; - name = "nose-${version}"; - - src = pkgs.fetchurl { - url = "mirror://pypi/n/nose/${name}.tar.gz"; - sha256 = "f1bffef9cbc82628f6e7d7b40d7e255aefaa1adb6a1b1d26c69a8b79e6208a98"; - }; - - propagatedBuildInputs = [ self.coverage ]; - - doCheck = false; # lot's of transient errors, too much hassle - checkPhase = if python.is_py3k or false then '' - ${python}/bin/${python.executable} setup.py build_tests - '' else "" + '' - rm functional_tests/test_multiprocessing/test_concurrent_shared.py* # see https://github.com/nose-devs/nose/commit/226bc671c73643887b36b8467b34ad485c2df062 - ${python}/bin/${python.executable} selftest.py - ''; - - meta = { - description = "A unittest-based testing framework for python that makes writing and running tests easier"; - }; - }; + nose = callPackage ../development/python-modules/nose { }; nose-exclude = callPackage ../development/python-modules/nose-exclude { };