You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by shaneknapp <gi...@git.apache.org> on 2017/03/28 20:55:42 UTC

[GitHub] spark pull request #17355: [SPARK-19955][PySpark] Jenkins Python Conda based...

Github user shaneknapp commented on a diff in the pull request:

    https://github.com/apache/spark/pull/17355#discussion_r108534754
  
    --- Diff: dev/run-pip-tests ---
    @@ -35,32 +35,38 @@ function delete_virtualenv() {
     }
     trap delete_virtualenv EXIT
     
    +PYTHON_EXECS=()
     # Some systems don't have pip or virtualenv - in those cases our tests won't work.
    -if ! hash virtualenv 2>/dev/null; then
    -  echo "Missing virtualenv skipping pip installability tests."
    +if hash virtualenv 2>/dev/null && [ ! -n "$USE_CONDA" ]; then
    +  echo "virtualenv installed - using. Note if this is a conda virtual env you may wish to set USE_CONDA"
    +  # Figure out which Python execs we should test pip installation with
    +  if hash python2 2>/dev/null; then
    +    # We do this since we are testing with virtualenv and the default virtual env python
    +    # is in /usr/bin/python
    +    PYTHON_EXECS+=('python2')
    +  elif hash python 2>/dev/null; then
    +    # If python2 isn't installed fallback to python if available
    +    PYTHON_EXECS+=('python')
    +  fi
    +  if hash python3 2>/dev/null; then
    +    PYTHON_EXECS+=('python3')
    +  fi
    +elif hash conda 2>/dev/null; then
    +  echo "Using conda virtual enviroments"
    +  PYTHON_EXECS=('3.5')
    +  USE_CONDA=1
    +else
    +  echo "Missing virtualenv & conda, skipping pip installability tests"
       exit 0
     fi
     if ! hash pip 2>/dev/null; then
       echo "Missing pip, skipping pip installability tests."
       exit 0
     fi
     
    -# Figure out which Python execs we should test pip installation with
    -PYTHON_EXECS=()
    -if hash python2 2>/dev/null; then
    -  # We do this since we are testing with virtualenv and the default virtual env python
    -  # is in /usr/bin/python
    -  PYTHON_EXECS+=('python2')
    -elif hash python 2>/dev/null; then
    -  # If python2 isn't installed fallback to python if available
    -  PYTHON_EXECS+=('python')
    -fi
    -if hash python3 2>/dev/null; then
    -  PYTHON_EXECS+=('python3')
    -fi
    -
    +set -x
    --- End diff --
    
    is this just there for debugging?  if so, pls remove before merging.  otherwise, consider sticking it at the beginning of the script.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org