diff --git a/pkgs/development/python-modules/joblib/default.nix b/pkgs/development/python-modules/joblib/default.nix new file mode 100644 index 00000000000..f6ead8c8266 --- /dev/null +++ b/pkgs/development/python-modules/joblib/default.nix @@ -0,0 +1,36 @@ +{ lib +, buildPythonPackage +, fetchPypi +, nose +, sphinx +, numpydoc +, isPy3k +, stdenv +}: + + +buildPythonPackage rec { + pname = "joblib"; + name = "${pname}-${version}"; + version = "0.10.3"; + src = fetchPypi { + inherit pname version; + sha256 = "29b2965a9efbc90a5fe66a389ae35ac5b5b0c1feabfc7cab7fd5d19f429a071d"; + }; + + checkInputs = [ nose sphinx numpydoc ]; + + # Failing test on Python 3.x and Darwin + postPatch = '''' + lib.optionalString (isPy3k || stdenv.isDarwin) '' + sed -i -e '70,84d' joblib/test/test_format_stack.py + # test_nested_parallel_warnings: ValueError: Non-zero return code: -9. + # Not sure why but it's nix-specific. Try removing for new joblib releases. + rm joblib/test/test_parallel.py + ''; + + meta = { + description = "Lightweight pipelining: using Python functions as pipeline jobs"; + homepage = http://pythonhosted.org/joblib/; + license = lib.licenses.bsd3; + }; +} \ No newline at end of file diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 7c06159eaa3..07e9bce555d 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -7896,31 +7896,7 @@ in { }; }; - joblib = buildPythonPackage rec { - pname = "joblib"; - name = "${pname}-${version}"; - version = "0.10.3"; - src = pkgs.fetchurl { - url = "mirror://pypi/${builtins.substring 0 1 pname}/${pname}/${name}.tar.gz"; - sha256 = "29b2965a9efbc90a5fe66a389ae35ac5b5b0c1feabfc7cab7fd5d19f429a071d"; - }; - - buildInputs = with self; [ nose sphinx numpydoc ]; - - # Failing test on Python 3.x and Darwin - postPatch = '''' + optionalString (isPy3k || stdenv.isDarwin) '' - sed -i -e '70,84d' joblib/test/test_format_stack.py - # test_nested_parallel_warnings: ValueError: Non-zero return code: -9. - # Not sure why but it's nix-specific. Try removing for new joblib releases. - rm joblib/test/test_parallel.py - ''; - - meta = { - description = "Lightweight pipelining: using Python functions as pipeline jobs"; - homepage = http://pythonhosted.org/joblib/; - license = licenses.bsd3; - }; - }; + joblib = callPackage ../development/python-modules/joblib { }; safe = buildPythonPackage rec { version = "0.4";