File tree Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Original file line number Diff line number Diff line change 18
18
from distutils .extension import Extension
19
19
requires = {"requires" : ["numpy" ]}
20
20
21
- lib_talib_name = 'ta_lib' # the underlying C library's name
22
-
23
21
platform_supported = False
24
22
25
23
if any (s in sys .platform for s in ['darwin' , 'linux' , 'bsd' , 'sunos' ]):
64
62
except ImportError :
65
63
has_cython = False
66
64
65
+ lib_talib_names = ['ta-lib' , 'ta_lib' ] # the underlying C library's name
66
+ lib_talib_name = 'ta-lib' # the name as of TA-Lib 0.6.1
67
+
67
68
for path in library_dirs :
68
69
try :
69
70
files = os .listdir (path )
70
- if any (lib_talib_name in f for f in files ):
71
+ for f in files :
72
+ for name in lib_talib_names :
73
+ if name in f :
74
+ lib_talib_name = name
75
+ break
76
+ else :
77
+ continue
71
78
break
79
+ else :
80
+ continue
81
+ break
72
82
except OSError :
73
83
pass
74
84
else :
You can’t perform that action at this time.
0 commit comments