2017-10-29 11:43:45 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, isPyPy
|
2021-11-29 21:35:51 +00:00
|
|
|
, pytestCheckHook
|
2022-07-16 11:59:03 +01:00
|
|
|
, cython
|
2017-10-29 11:43:45 +00:00
|
|
|
, toolz
|
|
|
|
, python
|
2020-10-16 07:54:52 +01:00
|
|
|
, isPy27
|
2017-10-29 11:43:45 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "cytoolz";
|
2022-07-16 11:59:03 +01:00
|
|
|
version = "0.12.0";
|
2020-10-16 07:54:52 +01:00
|
|
|
disabled = isPy27 || isPyPy;
|
2017-10-29 11:43:45 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2022-07-16 11:59:03 +01:00
|
|
|
sha256 = "sha256-wQWwX4XgP7zWAkQ3WWjmLkT+eYwVo1Mcki1TEBjSJBI=";
|
2017-10-29 11:43:45 +00:00
|
|
|
};
|
|
|
|
|
2022-07-16 11:59:03 +01:00
|
|
|
nativeBuildInputs = [ cython ];
|
|
|
|
|
2017-10-29 11:43:45 +00:00
|
|
|
propagatedBuildInputs = [ toolz ];
|
|
|
|
|
2021-11-29 21:35:51 +00:00
|
|
|
# tests are located in cytoolz/tests, however we can't import cytoolz
|
|
|
|
# from $PWD, as it will break relative imports
|
|
|
|
preCheck = ''
|
|
|
|
cd cytoolz
|
|
|
|
export PYTHONPATH=$out/${python.sitePackages}:$PYTHONPATH
|
2017-10-29 11:43:45 +00:00
|
|
|
'';
|
|
|
|
|
2021-11-29 21:35:51 +00:00
|
|
|
checkInputs = [ pytestCheckHook ];
|
|
|
|
|
2017-10-29 11:43:45 +00:00
|
|
|
meta = {
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://github.com/pytoolz/cytoolz/";
|
2017-10-29 11:43:45 +00:00
|
|
|
description = "Cython implementation of Toolz: High performance functional utilities";
|
|
|
|
license = "licenses.bsd3";
|
|
|
|
maintainers = with lib.maintainers; [ fridh ];
|
|
|
|
};
|
2018-12-07 14:07:33 +00:00
|
|
|
}
|