about summary refs log tree commit diff
path: root/pkgs/development/python-modules/edlib/default.nix
blob: 5a16cd6e023f23375326636eefa5673cf37392e7 (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
{
  buildPythonPackage,
  pythonOlder,
  edlib,
  cython,
  python,
}:

buildPythonPackage {
  inherit (edlib) pname src meta;
  version = "1.3.9";
  format = "setuptools";

  disabled = pythonOlder "3.6";

  sourceRoot = "${edlib.src.name}/bindings/python";

  preBuild = ''
    ln -s ${edlib.src}/edlib .
  '';

  EDLIB_OMIT_README_RST = 1;
  EDLIB_USE_CYTHON = 1;

  nativeBuildInputs = [ cython ];
  buildInputs = [ edlib ];

  checkPhase = ''
    runHook preCheck
    ${python.interpreter} test.py
    runHook postCheck
  '';

  pythonImportsCheck = [ "edlib" ];
}