# platorm dependant stuff if sys.platform=='darwin': # MacOSX vecLib framework, for BLAS, NAB 08/Apr/2013 idveclib=['/System/Library/Frameworks/vecLib.framework/Versions/A/Headers/'] scrnmodule_extra_link_args=['-lgsl'] else: scrnmodule_extra_link_args=['-lm','-latlas','-lgsl'] # now search for (in order) blas and cblas, and if neither exist, # tell the user. For example, Debian installs for both (so either # is okay), Ubuntu (**tentative**) install for cblas, and CentOS # installs for blas. cc=UnixCCompiler() theseLibs=('blas','cblas',) for thisLib in theseLibs: if cc.find_library_file(ld,thisLib): scrnmodule_extra_link_args.append( "-l"+thisLib ) print("<<< setup.py: will use "+str(thisLib)) del cc break if 'cc' in dir(): raise RuntimeError("Cannot find any of:"+str(theseLibs)) idveclib=[] fft=Extension('fftmodule', include_dirs=idnumpy + ['/opt/local/include'], library_dirs=ld, libraries=["pthread","fftw3f_threads","fftw3f"], extra_compile_args=[], extra_link_args=["-lpthread","-lfftw3f_threads","-lm"],#,"-lfftw3f" sources=["fftmodule.c"]
def find_library_file(self,dirs,lib,debug=0): return UnixCCompiler.find_library_file(self,dirs,lib,debug)