Merge pull request #119225 from drewrisinger/dr-pr-cvxpy-bump

This commit is contained in:
Sandro 2021-04-12 21:11:06 +02:00 committed by GitHub
commit 9baa681cda
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,4 +1,5 @@
{ lib { lib
, stdenv
, pythonOlder , pythonOlder
, buildPythonPackage , buildPythonPackage
, fetchPypi , fetchPypi
@ -8,19 +9,21 @@
, osqp , osqp
, scipy , scipy
, scs , scs
, useOpenmp ? true
# Check inputs # Check inputs
, pytestCheckHook , pytestCheckHook
}: }:
buildPythonPackage rec { buildPythonPackage rec {
pname = "cvxpy"; pname = "cvxpy";
version = "1.1.11"; version = "1.1.12";
format = "pyproject";
disabled = pythonOlder "3.5"; disabled = pythonOlder "3.5";
src = fetchPypi { src = fetchPypi {
inherit pname version; inherit pname version;
hash = "sha256-W4qly+g07Q1iYJ76/tGZNkBPa+oavhTDUYRQ3cZ+s1I="; hash = "sha256-tJnr+uT8ZF6VI2IVc//LHFtoVKG1wM4dZqippFhgWAc=";
}; };
propagatedBuildInputs = [ propagatedBuildInputs = [
@ -32,12 +35,20 @@ buildPythonPackage rec {
scs scs
]; ];
# Required flags from https://github.com/cvxgrp/cvxpy/releases/tag/v1.1.11
preBuild = lib.optional useOpenmp ''
export CFLAGS="-fopenmp"
export LDFLAGS="-lgomp"
'';
checkInputs = [ pytestCheckHook ]; checkInputs = [ pytestCheckHook ];
pytestFlagsArray = [ "./cvxpy" ]; pytestFlagsArray = [ "./cvxpy" ];
# Disable the slowest benchmarking tests, cuts test time in half # Disable the slowest benchmarking tests, cuts test time in half
disabledTests = [ disabledTests = [
"test_tv_inpainting" "test_tv_inpainting"
"test_diffcp_sdp_example" "test_diffcp_sdp_example"
] ++ lib.optionals stdenv.isAarch64 [
"test_ecos_bb_mi_lp_2" # https://github.com/cvxgrp/cvxpy/issues/1241#issuecomment-780912155
]; ];
meta = with lib; { meta = with lib; {