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 1818 from distutils .extension import Extension
1919 requires = {"requires" : ["numpy" ]}
2020
21- lib_talib_name = 'ta_lib' # the underlying C library's name
22-
2321platform_supported = False
2422
2523if any (s in sys .platform for s in ['darwin' , 'linux' , 'bsd' , 'sunos' ]):
6462except ImportError :
6563 has_cython = False
6664
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+
6768for path in library_dirs :
6869 try :
6970 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
7178 break
79+ else :
80+ continue
81+ break
7282 except OSError :
7383 pass
7484else :
You can’t perform that action at this time.
0 commit comments