You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kudu.apache.org by mp...@apache.org on 2019/02/28 01:13:10 UTC

[kudu] 01/02: python: fix Python 3.4 based tests

This is an automated email from the ASF dual-hosted git repository.

mpercy pushed a commit to branch branch-1.8.x
in repository https://gitbox.apache.org/repos/asf/kudu.git

commit e28318120ce1fb7195c58a2f096903b32aafa257
Author: Hao Hao <ha...@cloudera.com>
AuthorDate: Tue Jan 22 18:08:07 2019 -0800

    python: fix Python 3.4 based tests
    
    Pip released 19.0 recently and tests based on Python 3.4 started to fail. In
    addition, Python 3.4 will no longer be supported beginning with pip 19.1.
    Therefore, this patch updates the pip version to the last one that works.
    
    The full error message is below.
    
      $ pip install pandas
      DEPRECATION: Python 3.4 support has been deprecated. pip 19.1 will be the last one supporting it. Please upgrade your Python as Python 3.4 won't be maintained after March 2019 (cf PEP 429).
      Collecting pandas
        Using cached https://files.pythonhosted.org/packages/08/01/803834bc8a4e708aedebb133095a88a4dad9f45bbaf5ad777d2bea543c7e/pandas-0.22.0.tar.gz
        Installing build dependencies ... done
        Getting requirements to build wheel ... error
        Complete output from command /home/jenkins-slave/a/bin/python3 /home/jenkins-slave/a/lib/python3.4/site-packages/pip/_vendor/pep517/_in_process.py get_requires_for_build_wheel /tmp/tmpsknqc6o3:
        Traceback (most recent call last):
          File "/home/jenkins-slave/a/lib/python3.4/site-packages/pip/_vendor/pep517/_in_process.py", line 207, in <module>
            main()
          File "/home/jenkins-slave/a/lib/python3.4/site-packages/pip/_vendor/pep517/_in_process.py", line 197, in main
            json_out['return_val'] = hook(**hook_input['kwargs'])
          File "/home/jenkins-slave/a/lib/python3.4/site-packages/pip/_vendor/pep517/_in_process.py", line 54, in get_requires_for_build_wheel
            return hook(config_settings)
          File "/tmp/pip-build-env-z5ha9gs9/overlay/lib/python3.4/site-packages/setuptools/build_meta.py", line 115, in get_requires_for_build_wheel
            return _get_build_requires(config_settings, requirements=['wheel'])
          File "/tmp/pip-build-env-z5ha9gs9/overlay/lib/python3.4/site-packages/setuptools/build_meta.py", line 101, in _get_build_requires
            _run_setup()
          File "/tmp/pip-build-env-z5ha9gs9/overlay/lib/python3.4/site-packages/setuptools/build_meta.py", line 85, in _run_setup
            exec(compile(code, __file__, 'exec'), locals())
          File "setup.py", line 27, in <module>
            import versioneer
        ImportError: No module named 'versioneer'
    
    Change-Id: Iecbc55877e832a0ef437d2799e09c39fb314cb95
    Reviewed-on: http://gerrit.cloudera.org:8080/12255
    Reviewed-by: Adar Dembo <ad...@cloudera.com>
    Tested-by: Adar Dembo <ad...@cloudera.com>
    Reviewed-on: http://gerrit.cloudera.org:8080/12626
    Tested-by: Kudu Jenkins
---
 build-support/jenkins/build-and-test.sh | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/build-support/jenkins/build-and-test.sh b/build-support/jenkins/build-and-test.sh
index 6ba91c9..a308890 100755
--- a/build-support/jenkins/build-and-test.sh
+++ b/build-support/jenkins/build-and-test.sh
@@ -554,7 +554,14 @@ if [ "$BUILD_PYTHON3" == "1" ]; then
   # recursively to transitive dependencies installed via a direct dependency's
   # "python setup.py" command. Therefore we have no choice but to upgrade to a
   # new version of pip to proceed.
-  pip install -i https://pypi.python.org/simple $PIP_INSTALL_FLAGS --upgrade pip
+  #
+  # pip 19.1 doesn't support Python 3.4, which is the version of Python 3
+  # shipped with Ubuntu 14.04. However, there appears to be a bug[1] in pip 19.0
+  # preventing it from working properly with Python 3.4 as well. Therefore we
+  # must pin to a pip version from before 19.0.
+  #
+  # 1. https://github.com/pypa/pip/issues/6175
+  pip install -i https://pypi.python.org/simple $PIP_INSTALL_FLAGS --upgrade 'pip < 19.0'
 
   # New versions of pip raise an exception when upgrading old versions of
   # setuptools (such as the one found in el6). The workaround is to upgrade