Skip to content

Commit

Permalink
Merge pull request #12733 from richafrank/ta-lib
Browse files Browse the repository at this point in the history
Adding ta-lib
  • Loading branch information
scopatz authored Sep 29, 2020
2 parents 6f40361 + 33f291c commit 77d03cf
Show file tree
Hide file tree
Showing 4 changed files with 121 additions and 0 deletions.
16 changes: 16 additions & 0 deletions recipes/libta-lib/bld.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
setlocal EnableDelayedExpansion

pushd win

pushd c
for %%l in (cdd cdr cmd cmr csd csr) do (
pushd "make\%%l\win32\msvc"

nmake
IF !ERRORLEVEL! NEQ 0 exit 1

popd
)
copy include\*.h %LIBRARY_INC%
copy lib\*.lib %LIBRARY_LIB%
popd
7 changes: 7 additions & 0 deletions recipes/libta-lib/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash

pushd unix

./configure --prefix=$PREFIX
make
make install
54 changes: 54 additions & 0 deletions recipes/libta-lib/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
{% set name = "libta-lib" %}
{% set version = "0.4.0" %}


package:
name: {{ name|lower }}
version: {{ version }}

source:
- url: https://downloads.sourceforge.net/project/ta-lib/ta-lib/0.4.0/ta-lib-0.4.0-src.tar.gz # [unix]
sha256: 9ff41efcb1c011a4b4b6dfc91610b06e39b1d7973ed5d4dee55029a0ac4dc651 # [unix]
folder: unix # [unix]
- url: https://downloads.sourceforge.net/project/ta-lib/ta-lib/0.4.0/ta-lib-0.4.0-msvc.zip
sha256: 2dae7a1391222f0a7e601ecda654f93cebedfdb37afeb30df2721a3b0a717875
folder: win

build:
number: 0
run_exports:
- {{ pin_subpackage(name, max_pin='x.x') }}

requirements:
build:
- {{ compiler('c') }}

test:
commands:
- test -f $PREFIX/lib/libta_lib${SHLIB_EXT} # [unix]
- test -f $PREFIX/include/ta-lib/ta_abstract.h # [unix]
- test -f $PREFIX/include/ta-lib/ta_common.h # [unix]
- test -f $PREFIX/include/ta-lib/ta_defs.h # [unix]
- test -f $PREFIX/include/ta-lib/ta_func.h # [unix]
- if exist %LIBRARY_INC%\ta_abstract.h (exit 0) else (exit 1) # [win]
- if exist %LIBRARY_INC%\ta_common.h (exit 0) else (exit 1) # [win]
- if exist %LIBRARY_INC%\ta_defs.h (exit 0) else (exit 1) # [win]
- if exist %LIBRARY_INC%\ta_func.h (exit 0) else (exit 1) # [win]
- if exist %LIBRARY_LIB%\ta_abstract_cdd.lib (exit 0) else (exit 1) # [win]
- if exist %LIBRARY_LIB%\ta_common_cdr.lib (exit 0) else (exit 1) # [win]
- if exist %LIBRARY_LIB%\ta_func_cmd.lib (exit 0) else (exit 1) # [win]
- if exist %LIBRARY_LIB%\ta_libc_csd.lib (exit 0) else (exit 1) # [win]
- if exist %LIBRARY_LIB%\ta_libc_csr.lib (exit 0) else (exit 1) # [win]

about:
home: https://ta-lib.org/index.html
summary: "TA-Lib : Technical Analysis Library"
license: BSD-2-Clause
# License is included in windows source download, but not unix:
license_file: win/LICENSE.TXT

extra:
recipe-maintainers:
- gerrymanoim
- llllllllll
- richafrank
44 changes: 44 additions & 0 deletions recipes/ta-lib/meta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{% set name = "ta-lib" %}
{% set version = "0.4.18" %}


package:
name: {{ name|lower }}
version: {{ version }}

source:
- url: https://pypi.io/packages/source/{{ name[0] }}/{{ name }}/TA-Lib-{{ version }}.tar.gz
sha256: 261d88fbca4b1923b37e0aad23512bc9b9245726c187344e432ee6a4a9a134a8

build:
number: 0
script: {{ PYTHON }} -m pip install . -vv

requirements:
build:
- {{ compiler('c') }}
host:
- cython
- libta-lib
- numpy
- pip
- python
run:
- python
- {{ pin_compatible('numpy') }}

test:
imports:
- talib

about:
home: https://github.com/mrjbq7/ta-lib
summary: Python wrapper for TA-Lib
license: BSD-2-Clause
license_file: LICENSE

extra:
recipe-maintainers:
- gerrymanoim
- llllllllll
- richafrank

0 comments on commit 77d03cf

Please sign in to comment.