nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 buildPythonPackage,
4 fetchPypi,
5 isPyPy,
6 pytestCheckHook,
7 cython,
8 setuptools,
9 setuptools-git-versioning,
10 toolz,
11}:
12
13buildPythonPackage rec {
14 pname = "cytoolz";
15 version = "1.1.0";
16 pyproject = true;
17
18 disabled = isPyPy;
19
20 src = fetchPypi {
21 inherit pname version;
22 hash = "sha256-E6e/JUw8DSixLiKQuCrtDwl3pMKiv4SFT83HeWop87A=";
23 };
24
25 nativeBuildInputs = [
26 cython
27 setuptools
28 setuptools-git-versioning
29 ];
30
31 dependencies = [ toolz ];
32
33 # tests are located in cytoolz/tests, but we need to prevent import from the cytoolz source
34 preCheck = ''
35 mv cytoolz/tests tests
36 rm -rf cytoolz
37 sed -i "/testpaths/d" pyproject.toml
38 '';
39
40 disabledTests = [
41 # https://github.com/pytoolz/cytoolz/issues/200
42 "test_inspect_wrapped_property"
43 ];
44
45 nativeCheckInputs = [ pytestCheckHook ];
46
47 meta = {
48 homepage = "https://github.com/pytoolz/cytoolz/";
49 description = "Cython implementation of Toolz: High performance functional utilities";
50 license = lib.licenses.bsd3;
51 };
52}