18 , useOpenmp ? (!stdenv.isDarwin)
21 buildPythonPackage rec {
26 disabled = pythonOlder "3.7";
29 inherit pname version;
30 hash = "sha256-CjhqV4jb14t7IN0HFSTsY2yPpys2KOafGrxxTI+YEeU=";
34 # fix QP tests. remove on next update
35 # https://github.com/cvxpy/cvxpy/pull/2343
37 name = "fix-QP-tests.patch";
38 url = "https://github.com/cvxpy/cvxpy/commit/4c8549b9820e64c1b06f5d71c5d3f36528dd4a76.patch";
39 hash = "sha256-43zjS1STEBaGgj1jEOlX3XzMsE4wjoKAk8ApJo98AzY=";
43 # we need to patch out numpy version caps from upstream
45 sed -i 's/\(numpy>=[0-9.]*\),<[0-9.]*;/\1;/g' pyproject.toml
54 propagatedBuildInputs = [
68 # Required flags from https://github.com/cvxpy/cvxpy/releases/tag/v1.1.11
69 preBuild = lib.optionalString useOpenmp ''
70 export CFLAGS="-fopenmp"
71 export LDFLAGS="-lgomp"
79 # Disable the slowest benchmarking tests, cuts test time in half
81 "test_diffcp_sdp_example"
83 "test_partial_problem"
84 # https://github.com/cvxpy/cvxpy/issues/2174
85 "test_scipy_mi_time_limit_reached"
86 ] ++ lib.optionals stdenv.isAarch64 [
87 "test_ecos_bb_mi_lp_2" # https://github.com/cvxpy/cvxpy/issues/1241#issuecomment-780912155
90 pythonImportsCheck = [
95 description = "A domain-specific language for modeling convex optimization problems in Python";
96 homepage = "https://www.cvxpy.org/";
97 downloadPage = "https://github.com/cvxpy/cvxpy//releases";
98 changelog = "https://github.com/cvxpy/cvxpy/releases/tag/v${version}";
99 license = licenses.asl20;
100 maintainers = with maintainers; [ drewrisinger ];