mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 23:13:19 +00:00
python3Packages.cvxopt: use openblas for darwin
This commit is contained in:
parent
48fe7cfeb9
commit
0c20db8f0c
@ -1,8 +1,10 @@
|
||||
{ lib
|
||||
{ stdenv
|
||||
, lib
|
||||
, buildPythonPackage
|
||||
, fetchPypi
|
||||
, isPyPy
|
||||
, python
|
||||
, openblas
|
||||
, blas
|
||||
, lapack # build segfaults with 64-bit blas
|
||||
, suitesparse
|
||||
@ -28,13 +30,23 @@ buildPythonPackage rec {
|
||||
sha256 = "sha256-ALGyMvnR+QLVeKnXWBS2f6AgdY1a5CLijKjO9iafpcY=";
|
||||
};
|
||||
|
||||
buildInputs = [ blas lapack ];
|
||||
buildInputs = (if stdenv.isDarwin then [ openblas ] else [ blas lapack ]);
|
||||
doCheck = !stdenv.isDarwin;
|
||||
|
||||
# similar to Gsl, glpk, fftw there is also a dsdp interface
|
||||
# but dsdp is not yet packaged in nixpkgs
|
||||
preConfigure = ''
|
||||
preConfigure = (if stdenv.isDarwin then
|
||||
''
|
||||
export CVXOPT_BLAS_LIB=openblas
|
||||
export CVXOPT_LAPACK_LIB=openblas
|
||||
''
|
||||
else
|
||||
''
|
||||
export CVXOPT_BLAS_LIB=blas
|
||||
export CVXOPT_LAPACK_LIB=lapack
|
||||
'') +
|
||||
''
|
||||
export CVXOPT_BUILD_DSDP=0
|
||||
export CVXOPT_SUITESPARSE_LIB_DIR=${lib.getLib suitesparse}/lib
|
||||
export CVXOPT_SUITESPARSE_INC_DIR=${lib.getDev suitesparse}/include
|
||||
'' + lib.optionalString withGsl ''
|
||||
|
Loading…
Reference in New Issue
Block a user