提交 65cff731 authored 作者: ruslanagit's avatar ruslanagit

Fix format error

Removed extra blank line Removed trailing whitespaces Added whitespaces after ',' Added whitespaces after '=='
上级 9a0b5d36
......@@ -1204,7 +1204,7 @@ def default_blas_ldflags():
use_unix_epd = False
if use_unix_epd:
return ' '.join(
['-L%s' % os.path.join(sys.prefix, "lib")] +
['-L%s' % os.path.join(sys.prefix, "lib")] +
['-l%s' % l for l in blas_info['libraries']])
# Canopy
......@@ -1271,14 +1271,14 @@ def default_blas_ldflags():
return res
# to support path that includes spaces, we need to wrap it with double quotes on Windows
path_wrapper = "\"" if os.name =='nt' else ""
path_wrapper = "\"" if os.name == 'nt' else ""
ret = (
# TODO: the Gemm op below should separate the
# -L and -l arguments into the two callbacks
# that CLinker uses for that stuff. for now,
# we just pass the whole ldflags as the -l
# options part.
['-L%s%s%s' % (path_wrapper,l,path_wrapper) for l in blas_info.get('library_dirs', [])] +
['-L%s%s%s' % (path_wrapper, l, path_wrapper) for l in blas_info.get('library_dirs', [])] +
['-l%s' % l for l in blas_info.get('libraries', [])] +
blas_info.get('extra_link_args', []))
# For some very strange reason, we need to specify -lm twice
......@@ -1339,10 +1339,10 @@ def try_blas_flag(flags):
return 0;
}
""")
cflags = flags
cflags = flags
# to support path that includes spaces, we need to wrap it with double quotes on Windows
path_wrapper = "\"" if os.name =='nt' else ""
cflags.extend(['-L%s%s%s' % (path_wrapper,d,path_wrapper) for d in theano.gof.cmodule.std_lib_dirs()])
path_wrapper = "\"" if os.name == 'nt' else ""
cflags.extend(['-L%s%s%s' % (path_wrapper, d, path_wrapper) for d in theano.gof.cmodule.std_lib_dirs()])
res = GCC_compiler.try_compile_tmp(
test_code, tmp_prefix='try_blas_',
......
......@@ -2252,9 +2252,9 @@ class GCC_compiler(Compiler):
else:
cmd.extend(preargs)
# to support path that includes spaces, we need to wrap it with double quotes on Windows
path_wrapper = "\"" if os.name =='nt' else ""
cmd.extend(['-I%s%s%s' % (path_wrapper,idir,path_wrapper) for idir in include_dirs])
cmd.extend(['-L%s%s%s' % (path_wrapper,ldir,path_wrapper) for ldir in lib_dirs])
path_wrapper = "\"" if os.name == 'nt' else ""
cmd.extend(['-I%s%s%s' % (path_wrapper, idir, path_wrapper) for idir in include_dirs])
cmd.extend(['-L%s%s%s' % (path_wrapper, ldir, path_wrapper) for ldir in lib_dirs])
if hide_symbols and sys.platform != 'win32':
# This has been available since gcc 4.0 so we suppose it
# is always available. We pass it here since it
......
......@@ -31,7 +31,6 @@ def subprocess_Popen(command, **params):
if isinstance(command, list):
command = ' '.join(command)
# Using the dummy file descriptors below is a workaround for a
# crash experienced in an unusual Python 2.4.4 Windows environment
# with the default None values.
......
......@@ -322,9 +322,9 @@ class NVCC_compiler(Compiler):
for rpath in rpaths:
cmd.extend(['-Xlinker', ','.join(['-rpath', rpath])])
# to support path that includes spaces, we need to wrap it with double quotes on Windows
path_wrapper = "\"" if os.name =='nt' else ""
cmd.extend(['-I%s%s%s' % (path_wrapper,idir,path_wrapper) for idir in include_dirs])
cmd.extend(['-L%s%s%s' % (path_wrapper,ldir,path_wrapper) for ldir in lib_dirs])
path_wrapper = "\"" if os.name == 'nt' else ""
cmd.extend(['-I%s%s%s' % (path_wrapper, idir, path_wrapper) for idir in include_dirs])
cmd.extend(['-L%s%s%s' % (path_wrapper, ldir, path_wrapper) for ldir in lib_dirs])
cmd.extend(['-o', lib_filename])
cmd.append(os.path.split(cppfilename)[-1])
cmd.extend(['-l%s' % l for l in libs])
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论