diff --git a/.travis.yml b/.travis.yml index 6c4d6897a69de..bc87853b26d6e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -30,6 +30,24 @@ matrix: - JOB_TAG=_LOCALE - BUILD_TYPE=conda - JOB_NAME: "27_slow_nnet_LOCALE" + - python: 2.7 + env: + - NOSE_ARGS="not slow and not disabled" + - FULL_DEPS=true + - CLIPBOARD_GUI=gtk2 + - BUILD_TYPE=conda + - JOB_NAME: "27_build_test" + - JOB_TAG=_BUILD_TEST + - BUILD_TEST=true + - python: 2.7 + env: + - NOSE_ARGS="not slow and not disabled" + - FULL_DEPS=true + - CLIPBOARD_GUI=gtk2 + - BUILD_TYPE=pydata + - JOB_NAME: "27_build_test" + - JOB_TAG=_BUILD_TEST + - BUILD_TEST=true - python: 2.7 env: - NOSE_ARGS="not slow and not disabled" @@ -115,6 +133,24 @@ matrix: - NUMPY_BUILD=master - BUILD_TYPE=pydata - PANDAS_TESTING_MODE="deprecate" + - python: 2.7 + env: + - NOSE_ARGS="not slow and not disabled" + - FULL_DEPS=true + - CLIPBOARD_GUI=gtk2 + - BUILD_TYPE=conda + - JOB_NAME: "27_build_test" + - JOB_TAG=_BUILD_TEST + - BUILD_TEST=true + - python: 2.7 + env: + - NOSE_ARGS="not slow and not disabled" + - FULL_DEPS=true + - CLIPBOARD_GUI=gtk2 + - BUILD_TYPE=pydata + - JOB_NAME: "27_build_test" + - JOB_TAG=_BUILD_TEST + - BUILD_TEST=true before_install: - echo "before_install" diff --git a/ci/install_conda.sh b/ci/install_conda.sh index 4c8a62c64979d..3b9858595a991 100755 --- a/ci/install_conda.sh +++ b/ci/install_conda.sh @@ -96,7 +96,13 @@ if [ "$IRON_TOKEN" ]; then export CC='ccache gcc' fi -python setup.py build_ext --inplace && python setup.py develop +if [ "$BUILD_TEST" ]; then + pip uninstall --yes cython + pip install cython==0.15.1 + ( python setup.py build_ext --inplace && python setup.py develop ) || true +else + python setup.py build_ext --inplace && python setup.py develop +fi for package in beautifulsoup4; do pip uninstall --yes $package diff --git a/ci/install_pydata.sh b/ci/install_pydata.sh index 33a6d3854da22..f2ab5af34dc64 100755 --- a/ci/install_pydata.sh +++ b/ci/install_pydata.sh @@ -137,8 +137,15 @@ if [ "$IRON_TOKEN" ]; then fi # build pandas -python setup.py build_ext --inplace -python setup.py develop +if [ "$BUILD_TEST" ]; then + pip uninstall --yes cython + pip install cython==0.15.1 + ( python setup.py build_ext --inplace ) || true + ( python setup.py develop ) || true +else + python setup.py build_ext --inplace + python setup.py develop +fi # restore cython (if not numpy building) if [ -z "$NUMPY_BUILD" ]; then diff --git a/ci/requirements-2.7_BUILD_TEST.txt b/ci/requirements-2.7_BUILD_TEST.txt new file mode 100644 index 0000000000000..b273ca043c4a2 --- /dev/null +++ b/ci/requirements-2.7_BUILD_TEST.txt @@ -0,0 +1,5 @@ +dateutil +pytz +numpy +cython +nose diff --git a/ci/script.sh b/ci/script.sh index b1ba7ba79c816..fe9db792df5e7 100755 --- a/ci/script.sh +++ b/ci/script.sh @@ -16,9 +16,12 @@ fi "$TRAVIS_BUILD_DIR"/ci/build_docs.sh 2>&1 > /tmp/doc.log & # doc build log will be shown after tests - -echo nosetests --exe -A "$NOSE_ARGS" pandas --with-xunit --xunit-file=/tmp/nosetests.xml -nosetests --exe -A "$NOSE_ARGS" pandas --with-xunit --xunit-file=/tmp/nosetests.xml +if [ "$BUILD_TEST" ]; then + echo "We are not running nosetests as this is simply a build test." +else + echo nosetests --exe -A "$NOSE_ARGS" pandas --with-xunit --xunit-file=/tmp/nosetests.xml + nosetests --exe -A "$NOSE_ARGS" pandas --with-xunit --xunit-file=/tmp/nosetests.xml +fi RET="$?" diff --git a/setup.py b/setup.py index d4ef6a1d896d8..8066a6e0cae4f 100755 --- a/setup.py +++ b/setup.py @@ -11,13 +11,17 @@ import shutil import warnings import re +from distutils.version import LooseVersion # may need to work around setuptools bug by providing a fake Pyrex +min_cython_ver = '0.19.1' try: import Cython sys.path.insert(0, os.path.join(os.path.dirname(__file__), "fake_pyrex")) + ver = Cython.__version__ + _CYTHON_INSTALLED = ver >= LooseVersion(min_cython_ver) except ImportError: - pass + _CYTHON_INSTALLED = False # try bootstrapping setuptools if it doesn't exist try: @@ -74,6 +78,8 @@ from distutils.command.build_ext import build_ext as _build_ext try: + if not _CYTHON_INSTALLED: + raise ImportError('No supported version of Cython installed.') from Cython.Distutils import build_ext as _build_ext # from Cython.Distutils import Extension # to get pyrex debugging symbols cython = True