1{ lib
2, buildPythonPackage
3, fetchPypi
4, cmake
5, future
6, numpy
7, scipy
8# check inputs
9, pytestCheckHook
10}:
11
12buildPythonPackage rec {
13 pname = "osqp";
14 version = "0.6.1";
15
16 src = fetchPypi {
17 inherit pname version;
18 sha256 = "130frig5bznfacqp9jwbshmbqd2xw3ixdspsbkrwsvkdaab7kca7";
19 };
20
21 nativeBuildInputs = [ cmake ];
22 dontUseCmakeConfigure = true;
23
24 propagatedBuildInputs = [
25 future
26 numpy
27 scipy
28 ];
29
30 pythonImportsCheck = [ "osqp" ];
31 checkInputs = [ pytestCheckHook ];
32 dontUseSetuptoolsCheck = true; # don't run checks twice
33 disabledTests = [
34 "mkl_"
35 "update_matrices_tests" # broken w/ scipy >= 1.5.0. Remove next release. See https://github.com/oxfordcontrol/osqp-python/issues/44
36 ];
37
38 meta = with lib; {
39 description = "The Operator Splitting QP Solver";
40 longDescription = ''
41 Numerical optimization package for solving problems in the form
42 minimize 0.5 x' P x + q' x
43 subject to l <= A x <= u
44
45 where x in R^n is the optimization variable
46 '';
47 homepage = "https://osqp.org/";
48 downloadPage = "https://github.com/oxfordcontrol/osqp-python/releases";
49 license = licenses.asl20;
50 maintainers = with maintainers; [ drewrisinger ];
51 };
52}