pytrainer: unpin python 3.10
[NixPkgs.git] / pkgs / development / python-modules / daqp / default.nix
blob4497d546714df2c166f9ac756bdd5717cb9d9993
2   lib,
3   fetchFromGitHub,
4   buildPythonPackage,
5   unittestCheckHook,
6   cython_0,
7   setuptools,
8   wheel,
9   numpy,
11 buildPythonPackage rec {
12   pname = "daqp";
13   version = "0.5.1";
14   format = "pyproject";
16   src = fetchFromGitHub {
17     owner = "darnstrom";
18     repo = "daqp";
19     rev = "5a15a3d16731d3d50f867218c1b281567db556fd";
20     hash = "sha256-in7Ci/wM7i0csJ4XVfo1lboWOyfuuU+8E+TzGmMV3x0=";
21   };
23   sourceRoot = "${src.name}/interfaces/daqp-python";
25   postPatch = ''
26     sed -i 's|../../../daqp|../..|' setup.py
27     sed -i 's|if src_path and os.path.exists(src_path):|if False:|' setup.py
28   '';
30   nativeCheckInputs = [ unittestCheckHook ];
32   unittestFlagsArray = [
33     "-s"
34     "test"
35     "-p"
36     "'*.py'"
37     "-v"
38   ];
40   nativeBuildInputs = [
41     cython_0
42     setuptools
43     wheel
44   ];
46   propagatedBuildInputs = [ numpy ];
48   pythonImportsCheck = [ "daqp" ];
50   meta = with lib; {
51     description = "Dual active-set algorithm for convex quadratic programming";
52     homepage = "https://github.com/darnstrom/daqp";
53     license = licenses.mit;
54     maintainers = with maintainers; [ renesat ];
55   };