diff --git a/.travis.yml b/.travis.yml index 43cc9de2..0f4d39c9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,14 +3,16 @@ python: - "2.7" - "3.3" before_install: - - wget -O ta-lib-0.4.0-src.tar.gz http://sourceforge.net/projects/ta-lib/files/ta-lib/0.4.0/ta-lib-0.4.0-src.tar.gz/download - - tar xvzf ta-lib-0.4.0-src.tar.gz - - pushd ta-lib; ./configure; make; sudo make install; popd - - export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH + - if [ ${TRAVIS_PYTHON_VERSION:0:1} == "2" ]; then wget http://repo.continuum.io/miniconda/Miniconda-3.0.0-Linux-x86_64.sh -O miniconda.sh; else wget http://repo.continuum.io/miniconda/Miniconda3-3.0.0-Linux-x86_64.sh -O miniconda.sh; fi + - chmod +x miniconda.sh + - ./miniconda.sh -b + - if [ ${TRAVIS_PYTHON_VERSION:0:1} == "2" ]; then export PATH=/home/travis/miniconda/bin:$PATH; else export PATH=/home/travis/miniconda3/bin:$PATH; fi - sudo apt-get install gfortran install: - - cat etc/requirements_dev.txt | grep -v "^#" | grep -v "^$" | grep -v ipython | grep -v nose== | grep -v scipy | grep -v matplotlib | grep -v statsmodels | grep -v patsy | xargs pip install --use-mirrors - - etc/ordered_pip.sh etc/requirements.txt + - conda create -n testenv --yes pip python=$TRAVIS_PYTHON_VERSION + - source activate testenv + - conda install --yes -c https://conda.binstar.org/twiecki numpy==1.8.0 scipy nose matplotlib pandas Cython patsy statsmodels tornado pyparsing xlrd mock pytz requests six dateutil ta-lib logbook + - pip install flake8 nose-parameterized==0.3.3 nose-ignore-docstring==0.2 before_script: - "flake8 zipline tests" script: diff --git a/README.md b/README.md index 8d1d9780..24c6087b 100644 --- a/README.md +++ b/README.md @@ -71,6 +71,19 @@ Dependencies * requests * [python-dateutil](https://pypi.python.org/pypi/python-dateutil) (>= 2.1) + +Conda +----- + +We provide experimental support for conda packages. Thus if you installed [Anaconda](http://continuum.io/downloads) +you can try: +``` +conda install -c https://binstar.org/twiecki zipline +``` + +Currently this only works for linux 64 bit. If you want to help extend this, +have a look at the `conda` subdirectory. + Quickstart ========== diff --git a/conda/README.md b/conda/README.md new file mode 100644 index 00000000..2443b9e2 --- /dev/null +++ b/conda/README.md @@ -0,0 +1,24 @@ +conda build files +================= + +[conda](http://docs.continuum.io/conda/intro.html) is a +Python package management system by Continuum that provides +easy installation of binary packages. + +The files in this directory provide instructions for how +to create these binary packages. After installing conda and +conda-build you should be able to: + +``` +conda build ta-lib +conda build logbook +conda build zipline +``` + +You can then upload these binary packages to your own +channel at [binstar](https://binstar.org). + +Note that we currently don't have binary packages for +some platforms so if you successfully build them on anything +we don't provide at [https://binstar.org/twiecki](https://binstar.org/twiecki) +please let us know (especially windows). diff --git a/conda/logbook/bld.bat b/conda/logbook/bld.bat new file mode 100644 index 00000000..87b1481d --- /dev/null +++ b/conda/logbook/bld.bat @@ -0,0 +1,8 @@ +"%PYTHON%" setup.py install +if errorlevel 1 exit 1 + +:: Add more build steps here, if they are necessary. + +:: See +:: http://docs.continuum.io/conda/build.html +:: for a list of environment variables that are set during the build process. diff --git a/conda/logbook/build.sh b/conda/logbook/build.sh new file mode 100644 index 00000000..4d7fc032 --- /dev/null +++ b/conda/logbook/build.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +$PYTHON setup.py install + +# Add more build steps here, if they are necessary. + +# See +# http://docs.continuum.io/conda/build.html +# for a list of environment variables that are set during the build process. diff --git a/conda/logbook/meta.yaml b/conda/logbook/meta.yaml new file mode 100644 index 00000000..e21d8cf5 --- /dev/null +++ b/conda/logbook/meta.yaml @@ -0,0 +1,59 @@ +package: + name: logbook + version: !!str 0.6.0 + +source: + fn: Logbook-0.6.0.tar.gz + url: https://pypi.python.org/packages/source/L/Logbook/Logbook-0.6.0.tar.gz + md5: 2c77da3adeafd191bb8071cc5ad447bf +# patches: + # List any patch files here + # - fix.patch + +# build: + #preserve_egg_dir: True + #entry_points: + # Put any entry points (scripts to be generated automatically) here. The + # syntax is module:function. For example + # + # - logbook = logbook:main + # + # Would create an entry point called logbook that calls logbook.main() + + + # If this is a new build for the same version, increment the build + # number. If you do not include this key, it defaults to 0. + # number: 1 + +requirements: + build: + - python + - setuptools + + run: + - python + +test: + # Python imports + imports: + - logbook + + #commands: + # You can put test commands to be run here. Use this to test that the + # entry points work. + + + # You can also put a file called run_test.py in the recipe that will be run + # at test time. + + # requires: + # Put any additional test requirements here. For example + # - nose + +about: + home: http://logbook.pocoo.org/ + license: BSD + +# See +# http://docs.continuum.io/conda/build.html for +# more information about meta.yaml diff --git a/conda/ta-lib/build.sh b/conda/ta-lib/build.sh new file mode 100644 index 00000000..60204c47 --- /dev/null +++ b/conda/ta-lib/build.sh @@ -0,0 +1,13 @@ +#!/bin/bash +wget -O ta-lib-0.4.0-src.tar.gz http://sourceforge.net/projects/ta-lib/files/ta-lib/0.4.0/ta-lib-0.4.0-src.tar.gz/download +tar xvzf ta-lib-0.4.0-src.tar.gz +pushd ta-lib +./configure --prefix=$PREFIX +make +make install +popd + +export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$PREFIX/lib +python setup.py build_ext + +python setup.py install diff --git a/conda/ta-lib/meta.yaml b/conda/ta-lib/meta.yaml new file mode 100644 index 00000000..7d178fba --- /dev/null +++ b/conda/ta-lib/meta.yaml @@ -0,0 +1,57 @@ +package: + name: ta-lib + version: !!str 0.4.8 + +source: + fn: releases + url: https://github.com/mrjbq7/ta-lib/releases + #md5: +# patches: + # List any patch files here + # - fix.patch + +# build: + #preserve_egg_dir: True + #entry_points: + # Put any entry points (scripts to be generated automatically) here. The + # syntax is module:function. For example + # + # - ta-lib = ta-lib:main + # + # Would create an entry point called ta-lib that calls ta-lib.main() + + + # If this is a new build for the same version, increment the build + # number. If you do not include this key, it defaults to 0. + # number: 1 + +requirements: + build: + - python + + run: + - python + +test: + # Python imports + # imports: + + #commands: + # You can put test commands to be run here. Use this to test that the + # entry points work. + + + # You can also put a file called run_test.py in the recipe that will be run + # at test time. + + # requires: + # Put any additional test requirements here. For example + # - nose + +about: + home: http://github.com/mrjbq7/ta-lib + license: BSD License + +# See +# http://docs.continuum.io/conda/build.html for +# more information about meta.yaml diff --git a/conda/zipline/bld.bat b/conda/zipline/bld.bat new file mode 100644 index 00000000..87b1481d --- /dev/null +++ b/conda/zipline/bld.bat @@ -0,0 +1,8 @@ +"%PYTHON%" setup.py install +if errorlevel 1 exit 1 + +:: Add more build steps here, if they are necessary. + +:: See +:: http://docs.continuum.io/conda/build.html +:: for a list of environment variables that are set during the build process. diff --git a/conda/zipline/build.sh b/conda/zipline/build.sh new file mode 100644 index 00000000..4d7fc032 --- /dev/null +++ b/conda/zipline/build.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +$PYTHON setup.py install + +# Add more build steps here, if they are necessary. + +# See +# http://docs.continuum.io/conda/build.html +# for a list of environment variables that are set during the build process. diff --git a/conda/zipline/meta.yaml b/conda/zipline/meta.yaml new file mode 100644 index 00000000..0dd33548 --- /dev/null +++ b/conda/zipline/meta.yaml @@ -0,0 +1,43 @@ +package: + name: zipline + version: 0.6.0 + +source: + fn: zipline-0.6.0.tar.gz + url: https://pypi.python.org/packages/source/z/zipline/zipline-0.6.0.tar.gz + md5: 75d818c291df133946bb15a1b08ae0d8 + +# build: + #preserve_egg_dir: True + #entry_points: + # Put any entry points (scripts to be generated automatically) here. The + # syntax is module:function. For example + # + # - zipline = zipline:main + # + # Would create an entry point called zipline that calls zipline.main() + + + # If this is a new build for the same version, increment the build + # number. If you do not include this key, it defaults to 0. + # number: 1 + +requirements: + build: + - python + - pytz + - requests + - numpy + - pandas + - scipy + - matplotlib + - ta-lib + - logbook + +about: + home: https://github.com/quantopian/zipline + license: Apache Software License + +# See +# http://docs.continuum.io/conda/build.html for +# more information about meta.yaml