From fce1e555e76471376feefd87db9a07069ff978a8 Mon Sep 17 00:00:00 2001 From: John Benediktsson Date: Tue, 28 May 2024 22:20:51 -0700 Subject: [PATCH] Fix windows build, omg --- CHANGELOG | 5 +++++ setup.py | 2 +- talib/__init__.py | 2 +- talib/_ta_lib.c | 4 ++++ 4 files changed, 11 insertions(+), 2 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index e58c9cdee..cb22dbf83 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,8 @@ +0.4.30 +====== + +- [FIX]: Fix the C library imports to work again on Windows, oops. + 0.4.29 ====== diff --git a/setup.py b/setup.py index 94e66a499..bb9442ae1 100644 --- a/setup.py +++ b/setup.py @@ -143,7 +143,7 @@ def build_extensions(self): setup( name='TA-Lib', - version='0.4.29', + version='0.4.30', description='Python wrapper for TA-Lib', long_description=long_description, long_description_content_type='text/markdown', diff --git a/talib/__init__.py b/talib/__init__.py index 74c0af26d..5c81064e1 100644 --- a/talib/__init__.py +++ b/talib/__init__.py @@ -116,7 +116,7 @@ def wrapper(*args, **kwds): setattr(stream, func_name, wrapped_func) globals()[stream_func_name] = wrapped_func -__version__ = '0.4.29' +__version__ = '0.4.30' # In order to use this python library, talib (i.e. this __file__) will be # imported at some point, either explicitly or indirectly via talib.func diff --git a/talib/_ta_lib.c b/talib/_ta_lib.c index 7a38c2c25..4da3957ee 100644 --- a/talib/_ta_lib.c +++ b/talib/_ta_lib.c @@ -1219,10 +1219,14 @@ static CYTHON_INLINE float __PYX_NAN() { #define __PYX_HAVE__talib___ta_lib #define __PYX_HAVE_API__talib___ta_lib /* Early includes */ +#if defined(WIN32) || defined(MS_WINDOWS) +#include "ta_libc.h" +#else #include "ta-lib/ta_defs.h" #include "ta-lib/ta_common.h" #include "ta-lib/ta_abstract.h" #include "ta-lib/ta_func.h" +#endif #include #include