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-01-20 10:41:00 +00:00
|
|
|
version = "0.12.1";
|
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-03-15 16:39:30 +00:00
|
|
|
hash = "sha256-/DOQk5dIHJDePOyDG/uI2X4iDckZOdmWkgIC8YS0ZI4=";
|
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
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
meta = {
|
|
|
|
homepage = "https://github.com/pytoolz/cytoolz/";
|
|
|
|
description = "Cython implementation of Toolz: High performance functional utilities";
|
|
|
|
license = "licenses.bsd3";
|
|
|
|
maintainers = with lib.maintainers; [ fridh ];
|
|
|
|
};
|
|
|
|
}
|