about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/quadprog/default.nix
blob: 47a3f4e1a5558f3b36f3e88f12baceee8ea33852 (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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
{ lib
, buildPythonPackage
, pythonOlder
, fetchFromGitHub
, cython
, numpy
, pytestCheckHook
, scipy
}:

buildPythonPackage rec {
  pname = "quadprog";
  version = "0.1.11";
  format = "setuptools";

  disabled = pythonOlder "3.7";

  src = fetchFromGitHub {
    owner = pname;
    repo = pname;
    rev = "v${version}";
    hash = "sha256-/suv1KbG3HbiYqEiuCtB/ia3xbxAO5AMuWx1Svy0rMw=";
  };

  nativeBuildInputs = [
    cython
  ];

  propagatedBuildInputs = [
    numpy
  ];

  preBuild = ''
    cython quadprog/quadprog.pyx
  '';

  nativeCheckInputs = [
    pytestCheckHook
    scipy
  ];

  pytestFlagsArray = [
    # test fails on aarch64-darwin
    "--deselect=tests/test_1.py::test_5"
  ];

  meta = with lib; {
    homepage = "https://github.com/quadprog/quadprog";
    changelog = "https://github.com/quadprog/quadprog/releases/tag/v${version}";
    description = "Quadratic Programming Solver";
    license = licenses.gpl2Plus;
    maintainers = with maintainers; [ wegank ];
  };
}