Skip to content

Commit 3fc7314

Browse files
committed
backport the support for TA-Lib C library recent release version 0.6.1
1 parent 38cc10f commit 3fc7314

File tree

4 files changed

+26
-11
lines changed

4 files changed

+26
-11
lines changed

CHANGELOG

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
0.4.35
2+
======
3+
4+
- [FIX]: Make sure this wrapper works with TA-Lib 0.6.1
5+
16
0.4.34
27
======
38

pyproject.toml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
[project]
22
name = "ta-lib"
3-
version = "0.4.34"
4-
dynamic = ["authors", "classifiers", "dependencies", "description", "license", "readme"]
5-
6-
[build-system]
7-
requires = ["setuptools >= 51.0.0", "wheel", "numpy<2.0.0"]
8-
build-backend = "setuptools.build_meta:__legacy__"
3+
version = "0.4.35"
4+
dynamic = ["authors", "classifiers", "description", "license", "readme"]
5+
dependencies = [
6+
"setuptools",
7+
"numpy",
8+
]

setup.py

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@
1818
from distutils.extension import Extension
1919
requires = {"requires": ["numpy"]}
2020

21-
lib_talib_name = 'ta_lib' # the underlying C library's name
22-
2321
platform_supported = False
2422

2523
if any(s in sys.platform for s in ['darwin', 'linux', 'bsd', 'sunos']):
@@ -64,11 +62,23 @@
6462
except 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+
6768
for 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
7484
else:
@@ -143,7 +153,7 @@ def build_extensions(self):
143153

144154
setup(
145155
name='TA-Lib',
146-
version='0.4.34',
156+
version='0.4.35',
147157
description='Python wrapper for TA-Lib',
148158
long_description=long_description,
149159
long_description_content_type='text/markdown',

talib/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ def wrapper(*args, **kwds):
132132
setattr(stream, func_name, wrapped_func)
133133
globals()[stream_func_name] = wrapped_func
134134

135-
__version__ = '0.4.34'
135+
__version__ = '0.4.35'
136136

137137
# In order to use this python library, talib (i.e. this __file__) will be
138138
# imported at some point, either explicitly or indirectly via talib.func

0 commit comments

Comments
 (0)