about summary refs log tree commit diff
path: root/pkgs/development/python-modules/edlib/default.nix
blob: 64f9f96db4078b70ae892ebcdd44710afb1dd5ba (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
{
  lib,
  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" ];
}