Path: blob/master/build/pkgs/cvxopt/patches/setup.py.patch
8821 views
diff -ru src/setup.py b/setup.py1--- src/setup.py 2013-04-22 08:44:28.000000000 +02002+++ b/setup.py 2013-05-15 10:43:21.332392968 +02003@@ -2,26 +2,38 @@4from glob import glob56# Modifiy this if BLAS and LAPACK libraries are not in /usr/lib.7-BLAS_LIB_DIR = '/usr/lib'8+9+import os10+SAGE_LIB = os.environ['SAGE_LOCAL']+'/lib'11+SAGE_INCLUDE = os.environ['SAGE_LOCAL']+'/include'1213# Default names of BLAS and LAPACK libraries14-BLAS_LIB = ['blas']15LAPACK_LIB = ['lapack']16BLAS_EXTRA_LINK_ARGS = []1718+if os.environ['UNAME'] == 'CYGWIN':19+ BLAS_LIB =['blas', 'gfortran']20+ BLAS_LIB_DIR = '/usr/lib'21+elif os.environ['UNAME'] == 'Darwin':22+ BLAS_LIB =['blas','gfortran','m']23+ BLAS_LIB_DIR = '/System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/'24+else:25+ BLAS_LIB =['f77blas','cblas','gfortran','atlas','m']26+ BLAS_LIB_DIR = SAGE_LIB27+28# Set environment variable BLAS_NOUNDERSCORES=1 if your BLAS/LAPACK do29# not use trailing underscores30BLAS_NOUNDERSCORES = False3132# Set to 1 if you are using the random number generators in the GNU33# Scientific Library.34-BUILD_GSL = 035+BUILD_GSL = 13637# Directory containing libgsl (used only when BUILD_GSL = 1).38-GSL_LIB_DIR = '/usr/lib'39+GSL_LIB_DIR = SAGE_LIB4041# Directory containing the GSL header files (used only when BUILD_GSL = 1).42-GSL_INC_DIR = '/usr/include/gsl'43+GSL_INC_DIR = SAGE_INCLUDE4445# Set to 1 if you are installing the fftw module.46BUILD_FFTW = 047@@ -33,13 +45,13 @@48FFTW_INC_DIR = '/usr/include'4950# Set to 1 if you are installing the glpk module.51-BUILD_GLPK = 052+BUILD_GLPK = 15354# Directory containing libglpk (used only when BUILD_GLPK = 1).55-GLPK_LIB_DIR = '/usr/lib'56+GLPK_LIB_DIR = SAGE_LIB5758# Directory containing glpk.h (used only when BUILD_GLPK = 1).59-GLPK_INC_DIR = '/usr/include'60+GLPK_INC_DIR = SAGE_INCLUDE6162# Set to 1 if you are installing the DSDP module.63BUILD_DSDP = 064@@ -77,7 +89,7 @@65extmods += [fftw];6667if BUILD_GLPK:68- glpk = Extension('glpk', libraries = ['glpk'],69+ glpk = Extension('glpk', libraries = ['glpk', 'gmp', 'z'],70include_dirs = [ GLPK_INC_DIR ],71library_dirs = [ GLPK_LIB_DIR ],72sources = ['src/C/glpk.c'] )737475