about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/cymem/default.nix
blob: 6862d6447e5fcfb79c68d37f247dea58bcfc1dd9 (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
39
{ stdenv
, buildPythonPackage
, fetchFromGitHub
, cython
, python
}:
buildPythonPackage rec {
  pname = "cymem";
  version = "2.0.2";
  name = pname + "-" + version;

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

  propagatedBuildInputs = [
   cython
  ];

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

  checkPhase = ''
    cd cymem/tests
    ${python.interpreter} -m unittest discover -p "*test*"
  '';

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