We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f4e3767 commit 8aece0eCopy full SHA for 8aece0e
1 file changed
setup.py
@@ -18,8 +18,6 @@
18
from distutils.extension import Extension
19
requires = {"requires": ["numpy"]}
20
21
-lib_talib_name = 'ta_lib' # the underlying C library's name
22
-
23
platform_supported = False
24
25
if any(s in sys.platform for s in ['darwin', 'linux', 'bsd', 'sunos']):
@@ -64,11 +62,23 @@
64
62
except ImportError:
65
63
has_cython = False
66
+lib_talib_names = ['ta-lib', 'ta_lib'] # the underlying C library's name
+lib_talib_name = 'ta-lib' # the name as of TA-Lib 0.6.1
67
+
68
for path in library_dirs:
69
try:
70
files = os.listdir(path)
- 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
78
break
79
80
81
82
except OSError:
83
pass
84
else:
0 commit comments