summary refs log tree commit diff
path: root/pkgs/development/python-modules/cymem/default.nix
blob: 3e5d497dbfad596418b9093512fce855b928337e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
{ lib
, buildPythonPackage
, fetchFromGitHub
, cython
, unittestCheckHook
}:

buildPythonPackage rec {
  pname = "cymem";
  version = "2.0.3";

  src = fetchFromGitHub {
    owner = "explosion";
    repo = "cymem";
    rev = "v${version}";
    sha256 = "0cqz6whq4zginxjnh4cfqlsh535p4qz295ymvjchp71fv8mz11f6";
  };

  propagatedBuildInputs = [
    cython
  ];

  prePatch = ''
    substituteInPlace setup.py \
      --replace "wheel>=0.32.0,<0.33.0" "wheel>=0.31.0"
  '';

  checkInputs = [ unittestCheckHook ];

  unittestFlagsArray = [ "-s" "cymem/tests" "-p" "*test*" ];

  meta = with lib; {
    description = "Cython memory pool for RAII-style memory management";
    homepage = "https://github.com/explosion/cymem";
    license = licenses.mit;
    maintainers = with maintainers; [ ];
  };
}