You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kudu.apache.org by jt...@apache.org on 2018/08/08 14:39:10 UTC
kudu git commit: python: get new pandas dependency working on Python
2.6
Repository: kudu
Updated Branches:
refs/heads/master cf662826b -> d6c80b773
python: get new pandas dependency working on Python 2.6
pandas 0.18 dropped support for Python 2.6, so we need to downgrade our
dependency. Moreover, if we don't explicitly install a 2.6-compatible
version of numpy, we'll get the newest one courtesy of the pandas
installation.
Change-Id: I18dc108ffbe18c74167f6c761d4194293eae76db
Reviewed-on: http://gerrit.cloudera.org:8080/11149
Reviewed-by: Andrew Wong <aw...@cloudera.com>
Tested-by: Kudu Jenkins
Project: http://git-wip-us.apache.org/repos/asf/kudu/repo
Commit: http://git-wip-us.apache.org/repos/asf/kudu/commit/d6c80b77
Tree: http://git-wip-us.apache.org/repos/asf/kudu/tree/d6c80b77
Diff: http://git-wip-us.apache.org/repos/asf/kudu/diff/d6c80b77
Branch: refs/heads/master
Commit: d6c80b773020e7e2a5387f0f3419a504d2eef8eb
Parents: cf66282
Author: Adar Dembo <ad...@cloudera.com>
Authored: Tue Aug 7 11:41:15 2018 -0700
Committer: Adar Dembo <ad...@cloudera.com>
Committed: Wed Aug 8 05:24:33 2018 +0000
----------------------------------------------------------------------
build-support/jenkins/build-and-test.sh | 14 ++++++++++++++
python/requirements.txt | 6 +++++-
python/setup.py | 13 +++++++++----
3 files changed, 28 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/kudu/blob/d6c80b77/build-support/jenkins/build-and-test.sh
----------------------------------------------------------------------
diff --git a/build-support/jenkins/build-and-test.sh b/build-support/jenkins/build-and-test.sh
index 6765e46..83af078 100755
--- a/build-support/jenkins/build-and-test.sh
+++ b/build-support/jenkins/build-and-test.sh
@@ -454,6 +454,20 @@ if [ "$BUILD_PYTHON" == "1" ]; then
# check disabled.
pip install --disable-pip-version-check $PIP_INSTALL_FLAGS --upgrade 'setuptools >= 0.8'
+ # One of our dependencies is pandas, installed via requirements.txt below. It
+ # depends on numpy, and if we don't install numpy directly, the pandas
+ # installation will install the latest numpy which is incompatible with Python 2.6.
+ #
+ # To work around this, we need to install a 2.6-compatible version of numpy
+ # before installing pandas. Listing such a numpy version in requirements.txt
+ # doesn't work; it needs to be explicitly installed here.
+ #
+ # Installing numpy may involve some compiler work, so we must pass in the
+ # current values of CC and CXX.
+ #
+ # See https://github.com/numpy/numpy/releases/tag/v1.12.0 for more details.
+ CC=$CLANG CXX=$CLANG++ pip install $PIP_INSTALL_FLAGS 'numpy <1.12.0'
+
# We've got a new pip and new setuptools. We can now install the rest of the
# Python client's requirements.
#
http://git-wip-us.apache.org/repos/asf/kudu/blob/d6c80b77/python/requirements.txt
----------------------------------------------------------------------
diff --git a/python/requirements.txt b/python/requirements.txt
index 1107826..eeb91af 100644
--- a/python/requirements.txt
+++ b/python/requirements.txt
@@ -8,7 +8,11 @@ pytest >=2.8,<3.3
# See https://pypi.org/project/pytest-timeout/#id5 for more details.
pytest-timeout >=1.1.0,<1.2.1
-pandas <0.21
+# pandas 0.18 dropped support for python 2.6.
+#
+# See https://pandas.pydata.org/pandas-docs/version/0.23.0/whatsnew.html#v0-18-0-march-13-2016
+# for more details.
+pandas <0.18
cython ==0.26.1
six
http://git-wip-us.apache.org/repos/asf/kudu/blob/d6c80b77/python/setup.py
----------------------------------------------------------------------
diff --git a/python/setup.py b/python/setup.py
index 30e9d32..330f253 100644
--- a/python/setup.py
+++ b/python/setup.py
@@ -194,11 +194,16 @@ setup(
# requirements.txt so that dependencies aren't downloaded at test-time
# (when it's more difficult to override various pip installation options).
#
- # pytest 3.3 and pytest-timeout 1.2.1 dropped support for python 2.6.
+ # pytest 3.3 [1], pytest-timeout 1.2.1 [2], and pandas 0.18 [3] dropped
+ # support for python 2.6.
#
- # See https://docs.pytest.org/en/latest/changelog.html#id164 and
- # https://pypi.org/project/pytest-timeout/#id5 for more details.
- tests_require=['pytest >=2.8,<3.3', 'pytest-timeout >=1.1.0,<1.2.1', 'pandas <0.21'],
+ # 1. https://docs.pytest.org/en/latest/changelog.html#id164
+ # 2. https://pypi.org/project/pytest-timeout/#id5
+ # 3. https://pandas.pydata.org/pandas-docs/version/0.23.0/whatsnew.html#v0-18-0-march-13-2016
+ tests_require=['pytest >=2.8,<3.3',
+ 'pytest-timeout >=1.1.0,<1.2.1',
+ 'pandas <0.18'],
+
install_requires=['cython >= 0.21', 'pytz', 'six'],
description=DESCRIPTION,
long_description=LONG_DESCRIPTION,