65
65
66
66
if 'linux' in sys .platform :
67
67
IS_LIN = True
68
- lib_dir = jp ('lib' , 'intel64_lin' )
68
+ lib_dir = jp (daal_root , 'lib' , 'intel64_lin' )
69
69
elif sys .platform == 'darwin' :
70
70
IS_MAC = True
71
- lib_dir = 'lib'
71
+ lib_dir = jp ( daal_root , 'lib' )
72
72
elif sys .platform in ['win32' , 'cygwin' ]:
73
73
IS_WIN = True
74
- lib_dir = jp ('lib' , 'intel64_win' )
74
+ lib_dir = jp (daal_root , 'lib' , 'intel64_win' )
75
75
else :
76
76
assert False , sys .platform + ' not supported'
77
77
78
+ if not IS_MAC :
79
+ daal_lib_dir = lib_dir if os .path .isdir (lib_dir ) else os .path .dirname (lib_dir )
80
+
78
81
DAAL_DEFAULT_TYPE = 'double'
79
82
80
83
def get_sdl_cflags ():
@@ -125,7 +128,7 @@ def getpyexts():
125
128
126
129
if IS_MAC :
127
130
ela .append ('-stdlib=libc++' )
128
- ela .append ("-Wl,-rpath,{}" .format (jp ( daal_root , lib_dir ) ))
131
+ ela .append ("-Wl,-rpath,{}" .format (daal_lib_dir ))
129
132
for x in DIST_LIBDIRS :
130
133
ela .append ("-Wl,-rpath,{}" .format (x ))
131
134
ela .append ("-Wl,-rpath,{}" .format (jp (daal_root , '..' , 'tbb' , 'lib' )))
@@ -141,7 +144,7 @@ def getpyexts():
141
144
extra_compile_args = eca ,
142
145
extra_link_args = ela ,
143
146
libraries = libraries_plat ,
144
- library_dirs = [jp ( daal_root , lib_dir ) ] + DIST_LIBDIRS ,
147
+ library_dirs = [daal_lib_dir ] + DIST_LIBDIRS ,
145
148
language = 'c++' )])
146
149
147
150
cfg_vars = get_config_vars ()
0 commit comments