diff --git a/.travis.yml b/.travis.yml index 665c320..0b66961 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,6 +2,7 @@ language: python python: # Only 2.7 to prevent having to install NumPy and SciPy from source. - "2.7" + - "3.2" services: - elasticsearch @@ -12,9 +13,11 @@ virtualenv: install: - sudo apt-get update - - sudo apt-get install python-numpy python-scipy + - if [[ $TRAVIS_PYTHON_VERSION == 2* ]]; then sudo apt-get install python-numpy python-scipy; fi + - if [[ $TRAVIS_PYTHON_VERSION == 3* ]]; then sudo apt-get install python3-numpy python3-scipy; fi + - if [[ $TRAVIS_PYTHON_VERSION == 2* ]]; then pip install -r requirements.txt; fi + - if [[ $TRAVIS_PYTHON_VERSION == 3* ]]; then pip install -r requirements3.txt; fi - pip install . - - pip install -r requirements.txt - wget http://nlp.stanford.edu/software/stanford-corenlp-full-2014-06-16.zip -O temp.zip - unzip temp.zip - export CORENLP_HOME=`pwd`/stanford-corenlp-full-2014-06-16 diff --git a/requirements3.txt b/requirements3.txt new file mode 100644 index 0000000..99465a0 --- /dev/null +++ b/requirements3.txt @@ -0,0 +1,16 @@ +celery>=3.0.0 +chardet +cytoolz +elasticsearch +flask>=0.10.1 +gensim +kombu +#langid>=1.1.4dev +#librabbitmq +nltk>=3.0.0 +pyspotlight +scikit-learn>=0.15.2 +setuptools>=1.3.2 +six +unidecode +weighwords diff --git a/setup.py b/setup.py index 96b4482..7a09c3b 100644 --- a/setup.py +++ b/setup.py @@ -2,6 +2,7 @@ from distutils.core import setup import os.path +import sys # Get __version__ from xtas source @@ -19,7 +20,8 @@ def readme(): def requirements(): - with open(os.path.join(dist_dir, "requirements.txt")) as f: + fname = "requirements%s.txt" % ("" if sys.version_info.major == 2 else "3") + with open(os.path.join(dist_dir, fname)) as f: return f.readlines() diff --git a/xtas/tasks/cluster.py b/xtas/tasks/cluster.py index 97b89e3..7f1c4ed 100644 --- a/xtas/tasks/cluster.py +++ b/xtas/tasks/cluster.py @@ -7,7 +7,7 @@ import operator -import cytoolz +import cytoolz as toolz from six import itervalues from .es import fetch diff --git a/xtas/tests/test_corenlp.xml b/xtas/tests/test_corenlp.xml index 1280f56..687fefc 100644 --- a/xtas/tests/test_corenlp.xml +++ b/xtas/tests/test_corenlp.xml @@ -1,7 +1,7 @@ -