Skip to content

Commit

Permalink
v0.4.29
Browse files Browse the repository at this point in the history
  • Loading branch information
cgohlke committed May 22, 2024
1 parent 5a26cee commit 9a66e56
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 21 deletions.
38 changes: 21 additions & 17 deletions .github/workflows/wheel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,18 @@ on:

env:
TALIB_C_VER: 0.4.0
TALIB_PY_VER: 0.4.28
PIP_NO_BUILD_ISOLATION: 0
TALIB_PY_VER: 0.4.29
PIP_NO_VERIFY: 0
PIP_VERBOSE: 1
CIBW_BEFORE_BUILD: python -m pip install wheel oldest-supported-numpy Cython==0.29.36
# CIBW_ENVIRONMENT: "PIP_PRE=1"
CIBW_BUILD_VERBOSITY: 3
CIBW_BEFORE_BUILD: pip install -U setuptools wheel numpy==2.0.0rc2 Cython
CIBW_TEST_REQUIRES: pytest pandas polars
CIBW_TEST_COMMAND: >
cd .. &&
pytest --rootdir=C: -k "not RSI and not threading" {project}\tests
CIBW_TEST_SKIP: "*win32"
CIBW_SKIP: "pp* cp36*"
CIBW_SKIP: "pp* cp36* cp37* cp38*"
MSBUILDTREATHIGHERTOOLSVERSIONASCURRENT: 1

jobs:
Expand All @@ -29,18 +30,19 @@ jobs:
VS_PLATFORM: x64
steps:
- uses: actions/checkout@v4
- uses: microsoft/setup-msbuild@v1
- uses: microsoft/setup-msbuild@v2
with:
msbuild-architecture: x64
- run: build.cmd
shell: cmd
- uses: pypa/cibuildwheel@v2.16.2
- uses: pypa/cibuildwheel@v2.18.1
env:
CIBW_ARCHS_WINDOWS: AMD64
CIBW_ENVIRONMENT_WINDOWS: LIB="ta-lib\\c\\ide\\vs2022\\lib_proj\\$VS_PLATFORM\\cdr;$LIB"
- uses: actions/upload-artifact@v3
CIBW_ENVIRONMENT_WINDOWS: LIB="ta-lib\\c\\ide\\vs2022\\lib_proj\\$VS_PLATFORM\\cdr;$LIB" PIP_NO_BUILD_ISOLATION=false
- uses: actions/upload-artifact@v4
with:
path: ./wheelhouse/*.whl
name: wheels-win-amd64
build_x86:
name: Build x86 wheels
runs-on: ${{ matrix.os }}
Expand All @@ -51,18 +53,19 @@ jobs:
VS_PLATFORM: Win32
steps:
- uses: actions/checkout@v4
- uses: microsoft/setup-msbuild@v1
- uses: microsoft/setup-msbuild@v2
with:
msbuild-architecture: x86
- run: build.cmd
shell: cmd
- uses: pypa/cibuildwheel@v2.16.2
- uses: pypa/cibuildwheel@v2.18.1
env:
CIBW_ARCHS_WINDOWS: x86
CIBW_ENVIRONMENT_WINDOWS: LIB="ta-lib\\c\\ide\\vs2022\\lib_proj\\$VS_PLATFORM\\cdr;$LIB"
- uses: actions/upload-artifact@v3
CIBW_ENVIRONMENT_WINDOWS: LIB="ta-lib\\c\\ide\\vs2022\\lib_proj\\$VS_PLATFORM\\cdr;$LIB" PIP_NO_BUILD_ISOLATION=false
- uses: actions/upload-artifact@v4
with:
path: ./wheelhouse/*.whl
name: wheels-win32
# ARM64 wheel is broken
# build_arm64:
# name: Build ARM64 wheels
Expand All @@ -74,16 +77,17 @@ jobs:
# VS_PLATFORM: ARM64
# steps:
# - uses: actions/checkout@v4
# - uses: microsoft/setup-msbuild@v1
# - uses: microsoft/setup-msbuild@v2
# with:
# msbuild-architecture: arm64
# - run: build.cmd
# shell: cmd
# - uses: pypa/cibuildwheel@v2.16.2
# - uses: pypa/cibuildwheel@v2.18.1
# env:
# CIBW_SKIP: "pp* cp36* cp37* cp38* cp39* cp310*"
# CIBW_ARCHS_WINDOWS: ARM64
# CIBW_ENVIRONMENT_WINDOWS: LIB="ta-lib\\c\\ide\\vs2022\\lib_proj\\$VS_PLATFORM\\cdr;$LIB"
# - uses: actions/upload-artifact@v3
# CIBW_ENVIRONMENT_WINDOWS: LIB="ta-lib\\c\\ide\\vs2022\\lib_proj\\$VS_PLATFORM\\cdr;$LIB" PIP_NO_BUILD_ISOLATION=false
# - uses: actions/upload-artifact@v4
# with:
# path: ./wheelhouse/*.whl
# path: ./wheelhouse/*.whl
# name: wheels-win-arm64
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ Build [TA-Lib](https://github.com/ta-lib/ta-lib-python) wheels for Python on Win

The wheels can be downloaded from the [Releases](https://github.com/cgohlke/talib-build/releases) page.

Install a wheel on the command line, for example for Python 3.11 64-bit:
Install a wheel on the command line, for example for Python 3.12 64-bit:

$ py.exe -3.11 -m pip install TA_Lib-0.4.28-cp311-cp311-win_amd64.whl
$ py.exe -3.12 -m pip install TA_Lib-0.4.29-cp312-cp312-win_amd64.whl
8 changes: 8 additions & 0 deletions build.cmd
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
:: Download and build TA-Lib source code
@echo on

:: set TALIB_C_VER=0.4.0
:: set TALIB_PY_VER=0.4.29
:: set VS_PLATFORM=x64

curl -L -o talib.zip https://sourceforge.net/projects/ta-lib/files/ta-lib/%TALIB_C_VER%/ta-lib-%TALIB_C_VER%-msvc.zip
if errorlevel 1 exit /B 1

Expand All @@ -22,3 +26,7 @@ if errorlevel 1 exit /B 1

msbuild ta-lib\c\ide\vs2022\lib_proj\ta_lib.sln /m /t:Clean;Rebuild /p:Configuration=cdr /p:Platform=%VS_PLATFORM%
if errorlevel 1 exit /B 1

copy /Y ta-lib\c\include\*.h ta-lib\

:: del pyproject.toml
4 changes: 2 additions & 2 deletions talib.diff
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ index a68d128..caefaf8 100644
lib_talib_name = 'ta_libc_cdr'
- include_dirs = [r"c:\ta-lib\c\include"]
- library_dirs = [r"c:\ta-lib\c\lib"]
+ include_dirs = [numpy.get_include(), r'ta-lib\c\include']
+ include_dirs = [numpy.get_include(), '.']
+ library_dirs = []

if 'TA_INCLUDE_PATH' in os.environ:
paths = os.environ['TA_INCLUDE_PATH'].split(os.pathsep)
include_dirs = os.environ['TA_INCLUDE_PATH'].split(os.pathsep)
diff --git a/ta-lib/c/src/ta_func/ta_CCI.c b/ta-lib/c/src/ta_func/ta_CCI.c
index 14fa40e..d583b48 100644
--- a/ta-lib/c/src/ta_func/ta_CCI.c
Expand Down

0 comments on commit 9a66e56

Please sign in to comment.