1{ lib
2, buildPythonPackage
3, cmake
4, cvxopt
5, fetchPypi
6, future
7, numpy
8, pytestCheckHook
9, pythonOlder
10, qdldl
11, scipy
12, setuptools-scm
13}:
14
15buildPythonPackage rec {
16 pname = "osqp";
17 version = "0.6.3";
18 format = "setuptools";
19
20 disabled = pythonOlder "3.7";
21
22 src = fetchPypi {
23 inherit pname version;
24 hash = "sha256-A+Rg5oPsLOD4OTU936PEyP+lCauM9qKyr7tYb6RT4YA=";
25 };
26
27 SETUPTOOLS_SCM_PRETEND_VERSION = version;
28
29 dontUseCmakeConfigure = true;
30
31 nativeBuildInputs = [
32 cmake
33 setuptools-scm
34 ];
35
36 propagatedBuildInputs = [
37 future
38 numpy
39 qdldl
40 scipy
41 ];
42
43 nativeCheckInputs = [
44 cvxopt
45 pytestCheckHook
46 ];
47
48 pythonImportsCheck = [
49 "osqp"
50 ];
51
52 disabledTests = [
53 # Need an unfree license package - mkl
54 "test_issue14"
55 ];
56
57 meta = with lib; {
58 description = "The Operator Splitting QP Solver";
59 longDescription = ''
60 Numerical optimization package for solving problems in the form
61 minimize 0.5 x' P x + q' x
62 subject to l <= A x <= u
63
64 where x in R^n is the optimization variable
65 '';
66 homepage = "https://osqp.org/";
67 downloadPage = "https://github.com/oxfordcontrol/osqp-python/releases";
68 license = licenses.asl20;
69 maintainers = with maintainers; [ drewrisinger ];
70 };
71}