|
| 1 | +To get started developing on talib, clone the latest code from git and install: |
| 2 | + |
| 3 | +$ git clone git://github.com/mrjbq7/ta-lib.git |
| 4 | +$ cd ta-lib |
| 5 | +# you can run "git pull" here (no quotes) to update the sources in the future |
| 6 | +$ make build |
| 7 | +$ [sudo] make install |
| 8 | + |
| 9 | +Here's the full list of make commands (see the Makefile file): |
| 10 | +make build # builds and places libs in the project directory; required for testing |
| 11 | +make clean # cleans the local build files |
| 12 | +make install # installs talib system-wide |
| 13 | +make generate: # generates a fresh func.pyx file. Requires talib and TA-Lib to both be installed |
| 14 | +make perf # run performance profiling |
| 15 | +make test # run tests |
| 16 | + |
| 17 | +The source code is comprised of one python package, located in the talib directory, |
| 18 | +which itself has three Cython modules: func, abstract, and common. |
| 19 | + |
| 20 | +talib/common.pyx |
| 21 | + An internal-use module for functionality shared between func and abstract. |
| 22 | + |
| 23 | +talib/func.pyx |
| 24 | + This file is generated automatically by tools/generate.py and any changes made |
| 25 | + to it directly will get overwritten! |
| 26 | + |
| 27 | +talib/abstract.pyx |
| 28 | + This file contains the code for interfacing with the TA-Lib abstract interface |
| 29 | + and wrapping it into a pythonic Function class. |
| 30 | + |
| 31 | +talib/libc.pxd |
| 32 | + This "Cython header file" defines the C-level functions, variables and types we |
| 33 | + need to use in the above pyx files. |
| 34 | + |
| 35 | +tools/generate.py |
| 36 | + A script that generates and prints func.pyx to stdout. Gets information |
| 37 | + about all functions from the C headers of the installed TA-Lib. |
| 38 | + |
| 39 | +If you are interested in developing new indicator functions or whatnot on the |
| 40 | +underlying TA-Lib, you must install TA-Lib from svn. Here's how (Linux tested): |
| 41 | +``` |
| 42 | +$ cd ~/dev |
| 43 | +$ svn checkout svn://svn.code.sf.net/p/ta-lib/code/trunk@1545 ta-lib-code |
| 44 | +# later revisions break building ta_regtest (but claim to add support for VS2012) |
| 45 | +$ cd ta-lib-code/ta-lib/c/make/gen_make |
| 46 | +$ perl ./gen_make.pl |
| 47 | +$ # cd ta-lib-code/ta-lib/c/make/cmr && make --> compile the code (no install) |
| 48 | +$ cd ~/dev/ta-lib-code/tools |
| 49 | +# Depending upon your platform you may need to make minor changes to this script: |
| 50 | +$ perl ./release_unix.pl -version 0.4.X -source ../ta-lib/c |
| 51 | +$ cd ~/ta-lib-0.4.X-work/dist |
| 52 | +# the installable source package will be here, and if you wanted, the deb/rpm |
| 53 | +# packages then see http://ta-lib.org/d_misc/how-to_function.html and the |
| 54 | +# README/comments in the src |
| 55 | +``` |
0 commit comments