You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by ji...@apache.org on 2019/06/25 01:02:33 UTC

[flink] branch master updated (2949166 -> 8d98223)

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

jincheng pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/flink.git.


    from 2949166  [FLIN-12663]Implement HiveTableSource to read Hive tables
     new ea125a3  [FLINK-12931][python] Fix lint-python.sh cannot find flake8
     new 8d98223  [hotfix][python]Use of a variable like $X instead of ${X}

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 flink-python/dev/lint-python.sh | 33 ++++++++++++++++++---------------
 1 file changed, 18 insertions(+), 15 deletions(-)


[flink] 01/02: [FLINK-12931][python] Fix lint-python.sh cannot find flake8

Posted by ji...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

jincheng pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/flink.git

commit ea125a3d14a07935cd5766fcbe411254595c386b
Author: Dian Fu <fu...@alibaba-inc.com>
AuthorDate: Sun Jun 23 12:26:42 2019 +0800

    [FLINK-12931][python] Fix lint-python.sh cannot find flake8
---
 flink-python/dev/lint-python.sh | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)

diff --git a/flink-python/dev/lint-python.sh b/flink-python/dev/lint-python.sh
index c3a8339..e681589 100755
--- a/flink-python/dev/lint-python.sh
+++ b/flink-python/dev/lint-python.sh
@@ -204,7 +204,7 @@ function install_py_env() {
 # In some situations,you need to run the script with "sudo". e.g. sudo ./lint-python.sh
 function install_tox() {
     if [ -f "$TOX_PATH" ]; then
-        ${CONDA_PATH} remove tox -y -q 2>&1 >/dev/null
+        ${CONDA_PATH} remove -p ${CONDA_HOME} tox -y -q 2>&1 >/dev/null
         if [ $? -ne 0 ]; then
             echo "conda remove tox failed \
             please try to exec the script again.\
@@ -213,7 +213,7 @@ function install_tox() {
         fi
     fi
 
-    ${CONDA_PATH} install -c conda-forge tox -y -q 2>&1 >/dev/null
+    ${CONDA_PATH} install -p ${CONDA_HOME} -c conda-forge tox -y -q 2>&1 >/dev/null
     if [ $? -ne 0 ]; then
         echo "conda install tox failed \
         please try to exec the script again.\
@@ -226,7 +226,7 @@ function install_tox() {
 # In some situations,you need to run the script with "sudo". e.g. sudo ./lint-python.sh
 function install_flake8() {
     if [ -f "$FLAKE8_PATH" ]; then
-        ${CONDA_PATH} remove flake8 -y -q 2>&1 >/dev/null
+        ${CONDA_PATH} remove -p ${CONDA_HOME} flake8 -y -q 2>&1 >/dev/null
         if [ $? -ne 0 ]; then
             echo "conda remove flake8 failed \
             please try to exec the script again.\
@@ -235,7 +235,7 @@ function install_flake8() {
         fi
     fi
 
-    ${CONDA_PATH} install -c anaconda flake8 -y -q 2>&1 >/dev/null
+    ${CONDA_PATH} install -p ${CONDA_HOME} -c anaconda flake8 -y -q 2>&1 >/dev/null
     if [ $? -ne 0 ]; then
         echo "conda install flake8 failed \
         please try to exec the script again.\
@@ -248,7 +248,7 @@ function install_flake8() {
 # In some situations,you need to run the script with "sudo". e.g. sudo ./lint-python.sh
 function install_sphinx() {
     if [ -f "$SPHINX_PATH" ]; then
-        ${CONDA_PATH} remove sphinx -y -q 2>&1 >/dev/null
+        ${CONDA_PATH} remove -p ${CONDA_HOME} sphinx -y -q 2>&1 >/dev/null
         if [ $? -ne 0 ]; then
             echo "conda remove sphinx failed \
             please try to exec the script again.\
@@ -257,7 +257,7 @@ function install_sphinx() {
         fi
     fi
 
-    ${CONDA_PATH} install -c anaconda sphinx -y -q 2>&1 >/dev/null
+    ${CONDA_PATH} install -p ${CONDA_HOME} -c anaconda sphinx -y -q 2>&1 >/dev/null
     if [ $? -ne 0 ]; then
         echo "conda install sphinx failed \
         please try to exec the script again.\
@@ -529,6 +529,9 @@ CURRENT_DIR="$(cd "$( dirname "$0" )" && pwd)"
 FLINK_PYTHON_DIR=$(dirname "$CURRENT_DIR")
 pushd "$FLINK_PYTHON_DIR" &> /dev/null
 
+# conda home path
+CONDA_HOME=$CURRENT_DIR/.conda
+
 # conda path
 CONDA_PATH=$CURRENT_DIR/.conda/bin/conda
 


[flink] 02/02: [hotfix][python]Use of a variable like $X instead of ${X}

Posted by ji...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

jincheng pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/flink.git

commit 8d98223282e8479964f13d92c5e0a591c1a72c71
Author: sunjincheng121 <su...@gmail.com>
AuthorDate: Tue Jun 25 08:39:41 2019 +0800

    [hotfix][python]Use of a variable like $X instead of ${X}
---
 flink-python/dev/lint-python.sh | 30 +++++++++++++++---------------
 1 file changed, 15 insertions(+), 15 deletions(-)

diff --git a/flink-python/dev/lint-python.sh b/flink-python/dev/lint-python.sh
index e681589..66de146 100755
--- a/flink-python/dev/lint-python.sh
+++ b/flink-python/dev/lint-python.sh
@@ -190,7 +190,7 @@ function install_py_env() {
             fi
         fi
         print_function "STEP" "installing python${py_env[i]}..."
-        ${CONDA_PATH} create --name ${py_env[i]} -y -q python=${py_env[i]} 2>&1 >/dev/null
+        $CONDA_PATH create --name ${py_env[i]} -y -q python=${py_env[i]} 2>&1 >/dev/null
         if [ $? -ne 0 ]; then
             echo "conda install ${py_env[i]} failed.\
             You can retry to exec the script."
@@ -204,7 +204,7 @@ function install_py_env() {
 # In some situations,you need to run the script with "sudo". e.g. sudo ./lint-python.sh
 function install_tox() {
     if [ -f "$TOX_PATH" ]; then
-        ${CONDA_PATH} remove -p ${CONDA_HOME} tox -y -q 2>&1 >/dev/null
+        $CONDA_PATH remove -p $CONDA_HOME tox -y -q 2>&1 >/dev/null
         if [ $? -ne 0 ]; then
             echo "conda remove tox failed \
             please try to exec the script again.\
@@ -213,7 +213,7 @@ function install_tox() {
         fi
     fi
 
-    ${CONDA_PATH} install -p ${CONDA_HOME} -c conda-forge tox -y -q 2>&1 >/dev/null
+    $CONDA_PATH install -p $CONDA_HOME -c conda-forge tox -y -q 2>&1 >/dev/null
     if [ $? -ne 0 ]; then
         echo "conda install tox failed \
         please try to exec the script again.\
@@ -226,7 +226,7 @@ function install_tox() {
 # In some situations,you need to run the script with "sudo". e.g. sudo ./lint-python.sh
 function install_flake8() {
     if [ -f "$FLAKE8_PATH" ]; then
-        ${CONDA_PATH} remove -p ${CONDA_HOME} flake8 -y -q 2>&1 >/dev/null
+        $CONDA_PATH remove -p $CONDA_HOME flake8 -y -q 2>&1 >/dev/null
         if [ $? -ne 0 ]; then
             echo "conda remove flake8 failed \
             please try to exec the script again.\
@@ -235,7 +235,7 @@ function install_flake8() {
         fi
     fi
 
-    ${CONDA_PATH} install -p ${CONDA_HOME} -c anaconda flake8 -y -q 2>&1 >/dev/null
+    $CONDA_PATH install -p $CONDA_HOME -c anaconda flake8 -y -q 2>&1 >/dev/null
     if [ $? -ne 0 ]; then
         echo "conda install flake8 failed \
         please try to exec the script again.\
@@ -248,7 +248,7 @@ function install_flake8() {
 # In some situations,you need to run the script with "sudo". e.g. sudo ./lint-python.sh
 function install_sphinx() {
     if [ -f "$SPHINX_PATH" ]; then
-        ${CONDA_PATH} remove -p ${CONDA_HOME} sphinx -y -q 2>&1 >/dev/null
+        $CONDA_PATH remove -p $CONDA_HOME sphinx -y -q 2>&1 >/dev/null
         if [ $? -ne 0 ]; then
             echo "conda remove sphinx failed \
             please try to exec the script again.\
@@ -257,7 +257,7 @@ function install_sphinx() {
         fi
     fi
 
-    ${CONDA_PATH} install -p ${CONDA_HOME} -c anaconda sphinx -y -q 2>&1 >/dev/null
+    $CONDA_PATH install -p $CONDA_HOME -c anaconda sphinx -y -q 2>&1 >/dev/null
     if [ $? -ne 0 ]; then
         echo "conda install sphinx failed \
         please try to exec the script again.\
@@ -352,13 +352,13 @@ function create_dir() {
 
 # Set created py-env in $PATH for tox's creating virtual env
 function activate () {
-    if [ ! -d ${CURRENT_DIR}/.conda/envs ]; then
-        echo "For some unkown reasons,missing the directory ${CURRENT_DIR}/.conda/envs,\
+    if [ ! -d $CURRENT_DIR/.conda/envs ]; then
+        echo "For some unkown reasons,missing the directory $CURRENT_DIR/.conda/envs,\
         you should exec the script with the option: -f"
         exit 1
     fi
 
-    for py_dir in ${CURRENT_DIR}/.conda/envs/*
+    for py_dir in $CURRENT_DIR/.conda/envs/*
     do
         PATH=$py_dir/bin:$PATH
     done
@@ -533,16 +533,16 @@ pushd "$FLINK_PYTHON_DIR" &> /dev/null
 CONDA_HOME=$CURRENT_DIR/.conda
 
 # conda path
-CONDA_PATH=$CURRENT_DIR/.conda/bin/conda
+CONDA_PATH=$CONDA_HOME/bin/conda
 
 # tox path
-TOX_PATH=$CURRENT_DIR/.conda/bin/tox
+TOX_PATH=$CONDA_HOME/bin/tox
 
 # flake8 path
-FLAKE8_PATH=$CURRENT_DIR/.conda/bin/flake8
+FLAKE8_PATH=$CONDA_HOME/bin/flake8
 
 # sphinx path
-SPHINX_PATH=$CURRENT_DIR/.conda/bin/sphinx-build
+SPHINX_PATH=$CONDA_HOME/bin/sphinx-build
 
 _OLD_PATH="$PATH"
 
@@ -552,7 +552,7 @@ SUPPORT_OS=("Darwin" "Linux")
 STAGE_FILE=$CURRENT_DIR/.stage.txt
 
 # the dir includes all kinds of py env installed.
-VIRTUAL_ENV=$CURRENT_DIR/.conda/envs
+VIRTUAL_ENV=$CONDA_HOME/envs
 
 LOG_DIR=$CURRENT_DIR/log