From 38cc10fdf6197e364cde08182d1740d07834bc4e Mon Sep 17 00:00:00 2001 From: John Benediktsson Date: Fri, 15 Nov 2024 10:04:25 -0800 Subject: [PATCH 1/8] Include *.pxi in the source tar.gz --- CHANGELOG | 5 +++++ MANIFEST.in | 1 + pyproject.toml | 2 +- setup.py | 2 +- talib/__init__.py | 2 +- 5 files changed, 9 insertions(+), 3 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 6fda8de36..bc13387f5 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,8 @@ +0.4.34 +====== + +- [FIX]: include cython *.pxi files in the source tar.gz + 0.4.33 ====== diff --git a/MANIFEST.in b/MANIFEST.in index e02271d72..97961f076 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -3,4 +3,5 @@ include COPYRIGHT include README.md include talib/*.c include talib/*.pyx +include talib/*.pxi include tests/*.py diff --git a/pyproject.toml b/pyproject.toml index 2fb9266ed..7e2814dc9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "ta-lib" -version = "0.4.33" +version = "0.4.34" dynamic = ["authors", "classifiers", "dependencies", "description", "license", "readme"] [build-system] diff --git a/setup.py b/setup.py index 8a6ede057..769c6cb91 100644 --- a/setup.py +++ b/setup.py @@ -143,7 +143,7 @@ def build_extensions(self): setup( name='TA-Lib', - version='0.4.33', + version='0.4.34', 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 f215cd9e7..86d4f98c2 100644 --- a/talib/__init__.py +++ b/talib/__init__.py @@ -132,7 +132,7 @@ def wrapper(*args, **kwds): setattr(stream, func_name, wrapped_func) globals()[stream_func_name] = wrapped_func -__version__ = '0.4.33' +__version__ = '0.4.34' # 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 From 3fc7314f745e48a2c009aae83a0f78a9c8c85940 Mon Sep 17 00:00:00 2001 From: John Benediktsson Date: Wed, 25 Dec 2024 14:50:49 -0800 Subject: [PATCH 2/8] backport the support for TA-Lib C library recent release version 0.6.1 --- CHANGELOG | 5 +++++ pyproject.toml | 12 ++++++------ setup.py | 18 ++++++++++++++---- talib/__init__.py | 2 +- 4 files changed, 26 insertions(+), 11 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index bc13387f5..cda107e2d 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,8 @@ +0.4.35 +====== + +- [FIX]: Make sure this wrapper works with TA-Lib 0.6.1 + 0.4.34 ====== diff --git a/pyproject.toml b/pyproject.toml index 7e2814dc9..99bbad344 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,8 +1,8 @@ [project] name = "ta-lib" -version = "0.4.34" -dynamic = ["authors", "classifiers", "dependencies", "description", "license", "readme"] - -[build-system] -requires = ["setuptools >= 51.0.0", "wheel", "numpy<2.0.0"] -build-backend = "setuptools.build_meta:__legacy__" +version = "0.4.35" +dynamic = ["authors", "classifiers", "description", "license", "readme"] +dependencies = [ + "setuptools", + "numpy", +] diff --git a/setup.py b/setup.py index 769c6cb91..2d08605c4 100644 --- a/setup.py +++ b/setup.py @@ -18,8 +18,6 @@ from distutils.extension import Extension requires = {"requires": ["numpy"]} -lib_talib_name = 'ta_lib' # the underlying C library's name - platform_supported = False if any(s in sys.platform for s in ['darwin', 'linux', 'bsd', 'sunos']): @@ -64,11 +62,23 @@ except ImportError: has_cython = False +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 + for path in library_dirs: try: files = os.listdir(path) - if any(lib_talib_name in f for f in files): + for f in files: + for name in lib_talib_names: + if name in f: + lib_talib_name = name + break + else: + continue break + else: + continue + break except OSError: pass else: @@ -143,7 +153,7 @@ def build_extensions(self): setup( name='TA-Lib', - version='0.4.34', + version='0.4.35', 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 86d4f98c2..3e33a6bab 100644 --- a/talib/__init__.py +++ b/talib/__init__.py @@ -132,7 +132,7 @@ def wrapper(*args, **kwds): setattr(stream, func_name, wrapped_func) globals()[stream_func_name] = wrapped_func -__version__ = '0.4.34' +__version__ = '0.4.35' # 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 From c893ffcb6fd6e782356935d7d9551e9db3003310 Mon Sep 17 00:00:00 2001 From: John Benediktsson Date: Wed, 1 Jan 2025 14:49:54 -0800 Subject: [PATCH 3/8] version bump 0.4.36 --- CHANGELOG | 5 +++++ pyproject.toml | 2 +- setup.py | 16 +++------------- talib/__init__.py | 2 +- 4 files changed, 10 insertions(+), 15 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index cda107e2d..b4e8741af 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,8 @@ +0.4.36 +====== + +- [BUG]: Make this release only support TA-Lib 0.4.0 + 0.4.35 ====== diff --git a/pyproject.toml b/pyproject.toml index 99bbad344..3b89c36ab 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "ta-lib" -version = "0.4.35" +version = "0.4.36" dynamic = ["authors", "classifiers", "description", "license", "readme"] dependencies = [ "setuptools", diff --git a/setup.py b/setup.py index 2d08605c4..9d4a9c54b 100644 --- a/setup.py +++ b/setup.py @@ -62,23 +62,13 @@ except ImportError: has_cython = False -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 +lib_talib_name = 'ta_lib' # the name as of TA-Lib 0.4.0 for path in library_dirs: try: files = os.listdir(path) - for f in files: - for name in lib_talib_names: - if name in f: - lib_talib_name = name - break - else: - continue + if any(lib_talib_name in f for f in files): break - else: - continue - break except OSError: pass else: @@ -153,7 +143,7 @@ def build_extensions(self): setup( name='TA-Lib', - version='0.4.35', + version='0.4.36', 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 3e33a6bab..662190b4b 100644 --- a/talib/__init__.py +++ b/talib/__init__.py @@ -132,7 +132,7 @@ def wrapper(*args, **kwds): setattr(stream, func_name, wrapped_func) globals()[stream_func_name] = wrapped_func -__version__ = '0.4.35' +__version__ = '0.4.36' # 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 From c2ef3c645020a9a8e076ba968063d504d6ff4160 Mon Sep 17 00:00:00 2001 From: John Benediktsson Date: Wed, 1 Jan 2025 14:56:55 -0800 Subject: [PATCH 4/8] .github: test on this branch --- .github/workflows/tests.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 0f10607f8..121c6a6ed 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -2,9 +2,9 @@ name: Tests on: push: - branches: [ master ] + branches: [ 0.4 ] pull_request: - branches: [ master ] + branches: [ 0.4 ] jobs: build: From 6a8b2b71dde726d33f67f6466caed000c2469b66 Mon Sep 17 00:00:00 2001 From: John Benediktsson Date: Sat, 4 Jan 2025 09:37:20 -0800 Subject: [PATCH 5/8] make sure to pin numpy<2 --- CHANGELOG | 5 +++++ pyproject.toml | 4 ++-- setup.py | 8 ++++---- talib/__init__.py | 2 +- 4 files changed, 12 insertions(+), 7 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index b4e8741af..5f83de7ed 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,8 @@ +0.4.37 +====== + +- [FIX]: Make sure to pin numpy<2 in the setup.py. + 0.4.36 ====== diff --git a/pyproject.toml b/pyproject.toml index 3b89c36ab..a69d15496 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,8 +1,8 @@ [project] name = "ta-lib" -version = "0.4.36" +version = "0.4.37" dynamic = ["authors", "classifiers", "description", "license", "readme"] dependencies = [ "setuptools", - "numpy", + "numpy<2", ] diff --git a/setup.py b/setup.py index 9d4a9c54b..0f9e7739d 100644 --- a/setup.py +++ b/setup.py @@ -9,14 +9,14 @@ from setuptools import setup, Extension from setuptools.dist import Distribution requires = { - "install_requires": ["numpy"], - "setup_requires": ["numpy"] + "install_requires": ["numpy<2"], + "setup_requires": ["numpy<2"] } except ImportError: from distutils.core import setup from distutils.dist import Distribution from distutils.extension import Extension - requires = {"requires": ["numpy"]} + requires = {"requires": ["numpy<2"]} platform_supported = False @@ -143,7 +143,7 @@ def build_extensions(self): setup( name='TA-Lib', - version='0.4.36', + version='0.4.37', 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 662190b4b..649c8dab2 100644 --- a/talib/__init__.py +++ b/talib/__init__.py @@ -132,7 +132,7 @@ def wrapper(*args, **kwds): setattr(stream, func_name, wrapped_func) globals()[stream_func_name] = wrapped_func -__version__ = '0.4.36' +__version__ = '0.4.37' # 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 From a9c0990ea0e339513ba9ea1fa6e409af0d2505f5 Mon Sep 17 00:00:00 2001 From: John Benediktsson Date: Fri, 7 Feb 2025 15:25:12 -0800 Subject: [PATCH 6/8] fix lib name on windows --- pyproject.toml | 2 +- setup.py | 6 +++--- talib/__init__.py | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index a69d15496..3df370926 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "ta-lib" -version = "0.4.37" +version = "0.4.38" dynamic = ["authors", "classifiers", "description", "license", "readme"] dependencies = [ "setuptools", diff --git a/setup.py b/setup.py index 0f9e7739d..92f7e494a 100644 --- a/setup.py +++ b/setup.py @@ -20,6 +20,8 @@ platform_supported = False +lib_talib_name = 'ta_lib' # the name as of TA-Lib 0.4.0 + if any(s in sys.platform for s in ['darwin', 'linux', 'bsd', 'sunos']): platform_supported = True include_dirs = [ @@ -62,8 +64,6 @@ except ImportError: has_cython = False -lib_talib_name = 'ta_lib' # the name as of TA-Lib 0.4.0 - for path in library_dirs: try: files = os.listdir(path) @@ -143,7 +143,7 @@ def build_extensions(self): setup( name='TA-Lib', - version='0.4.37', + version='0.4.38', 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 649c8dab2..0403ced2f 100644 --- a/talib/__init__.py +++ b/talib/__init__.py @@ -132,7 +132,7 @@ def wrapper(*args, **kwds): setattr(stream, func_name, wrapped_func) globals()[stream_func_name] = wrapped_func -__version__ = '0.4.37' +__version__ = '0.4.38' # 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 From dd9cfd007c49f4e0029a5b3df24de3fee69f2556 Mon Sep 17 00:00:00 2001 From: John Benediktsson Date: Fri, 7 Feb 2025 15:25:30 -0800 Subject: [PATCH 7/8] update changelog --- CHANGELOG | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG b/CHANGELOG index 5f83de7ed..18324a42f 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,8 @@ +0.4.38 +====== + +- [FIX]: Fix lib name on windows. + 0.4.37 ====== From 31fd12ee7fbf83f8f76888e9537050799a2d55a3 Mon Sep 17 00:00:00 2001 From: John Benediktsson Date: Fri, 7 Feb 2025 15:35:04 -0800 Subject: [PATCH 8/8] remove python 3.7 --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 121c6a6ed..a95d491b7 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] + python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"] steps: - uses: actions/checkout@v3