2020-04-24 23:36:52 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, isPyPy
|
2021-12-26 17:43:05 +00:00
|
|
|
, pytestCheckHook
|
2022-08-12 12:06:08 +00:00
|
|
|
, cython
|
2020-04-24 23:36:52 +00:00
|
|
|
, toolz
|
|
|
|
, python
|
2020-10-16 20:44:37 +00:00
|
|
|
, isPy27
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "cytoolz";
|
2023-11-16 04:20:00 +00:00
|
|
|
version = "0.12.2";
|
2024-01-02 11:29:13 +00:00
|
|
|
format = "setuptools";
|
2020-10-16 20:44:37 +00:00
|
|
|
disabled = isPy27 || isPyPy;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2023-11-16 04:20:00 +00:00
|
|
|
hash = "sha256-MdSwRV1y2RRkX4A9kX2vTzFNEVxw3gV404IN64sQH2Y=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-08-12 12:06:08 +00:00
|
|
|
nativeBuildInputs = [ cython ];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
propagatedBuildInputs = [ toolz ];
|
|
|
|
|
2021-12-26 17:43:05 +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
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [ pytestCheckHook ];
|
2021-12-26 17:43:05 +00:00
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://github.com/pytoolz/cytoolz/";
|
|
|
|
description = "Cython implementation of Toolz: High performance functional utilities";
|
2024-01-02 11:29:13 +00:00
|
|
|
license = licenses.bsd3;
|
2020-04-24 23:36:52 +00:00
|
|
|
maintainers = with lib.maintainers; [ fridh ];
|
|
|
|
};
|
|
|
|
}
|