Skip to content

BUG: Fix for cython version checking closes #9827 #9881

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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"
Expand Down
8 changes: 7 additions & 1 deletion ci/install_conda.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
11 changes: 9 additions & 2 deletions ci/install_pydata.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 5 additions & 0 deletions ci/requirements-2.7_BUILD_TEST.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
dateutil
pytz
numpy
cython
nose
9 changes: 6 additions & 3 deletions ci/script.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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="$?"

Expand Down
8 changes: 7 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down