1{ lib
2, buildPythonPackage
3, fetchPypi
4, fetchpatch
5, stdenv
6, numpydoc
7, pytest
8, python-lz4
9, setuptools
10, sphinx
11}:
12
13
14buildPythonPackage rec {
15 pname = "joblib";
16 version = "0.13.2";
17
18 src = fetchPypi {
19 inherit pname version;
20 sha256 = "315d6b19643ec4afd4c41c671f9f2d65ea9d787da093487a81ead7b0bac94524";
21 };
22
23 # python-lz4 compatibility
24 # https://github.com/joblib/joblib/pull/847
25 patches = [
26 (fetchpatch {
27 url = https://github.com/joblib/joblib/commit/d3235fd601f40c91e074d48a411d7380329fe155.patch;
28 sha256 = "1hg1vfbba7mfilrpvmd97s68v03vs4bhlp1c1dj9lizi51mj2q2h";
29 })
30 (fetchpatch {
31 url = https://github.com/joblib/joblib/commit/884c92cd2aa5c2c1975ab48786da75556d779833.patch;
32 sha256 = "11kvpkvi428dq13ayy7vfyrib8isvcrdw8cd5hxkp5axr7sl12ba";
33 })
34 (fetchpatch {
35 url = https://github.com/joblib/joblib/commit/f1e177d781cc0d64420ec964a0b17d8268cb42a0.patch;
36 sha256 = "1sq6wcw4bhaq8cqwcd43fdws3467qy342xx3pgv62hp2nn75a21d";
37 })
38 ];
39
40 checkInputs = [ sphinx numpydoc pytest ];
41 propagatedBuildInputs = [ python-lz4 setuptools ];
42
43 # test_disk_used is broken: https://github.com/joblib/joblib/issues/57
44 # test_dispatch_multiprocessing is broken only on Darwin.
45 checkPhase = ''
46 py.test -k 'not test_disk_used${lib.optionalString (stdenv.isDarwin) " and not test_dispatch_multiprocessing"}' joblib/test
47 '';
48
49 meta = {
50 description = "Lightweight pipelining: using Python functions as pipeline jobs";
51 homepage = https://pythonhosted.org/joblib/;
52 license = lib.licenses.bsd3;
53 maintainers = with lib.maintainers; [ costrouc ];
54 };
55}