1{ lib
2, buildPythonPackage
3, fetchPypi
4, isPyPy
5, pytestCheckHook
6, cython
7, toolz
8, python
9, isPy27
10}:
11
12buildPythonPackage rec {
13 pname = "cytoolz";
14 version = "0.12.0";
15 disabled = isPy27 || isPyPy;
16
17 src = fetchPypi {
18 inherit pname version;
19 sha256 = "sha256-wQWwX4XgP7zWAkQ3WWjmLkT+eYwVo1Mcki1TEBjSJBI=";
20 };
21
22 nativeBuildInputs = [ cython ];
23
24 propagatedBuildInputs = [ toolz ];
25
26 # tests are located in cytoolz/tests, however we can't import cytoolz
27 # from $PWD, as it will break relative imports
28 preCheck = ''
29 cd cytoolz
30 export PYTHONPATH=$out/${python.sitePackages}:$PYTHONPATH
31 '';
32
33 checkInputs = [ pytestCheckHook ];
34
35 meta = {
36 homepage = "https://github.com/pytoolz/cytoolz/";
37 description = "Cython implementation of Toolz: High performance functional utilities";
38 license = "licenses.bsd3";
39 maintainers = with lib.maintainers; [ fridh ];
40 };
41}