You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues-all@impala.apache.org by "Quanlong Huang (Jira)" <ji...@apache.org> on 2022/06/17 00:43:00 UTC
[jira] [Commented] (IMPALA-11366) Impala-shell failed to build if the build date contains Non-ASCII characters
[ https://issues.apache.org/jira/browse/IMPALA-11366?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17555333#comment-17555333 ]
Quanlong Huang commented on IMPALA-11366:
-----------------------------------------
The script impala_build_version.py is generated in shell/make_shell_tarball.sh:
{code:bash}
rm -f ${THRIFT_GEN_PY_DIR}/impala_build_version.py
cat > ${THRIFT_GEN_PY_DIR}/impala_build_version.py <<EOF
...
def get_version():
return "${VERSION}"
def get_git_hash():
return "${GIT_HASH}"
def get_build_date():
return "${BUILD_DATE}"
EOF
{code}
We just need adding this heading line in it:
{code:python}
# -*- coding: utf-8 -*-
{code}
> Impala-shell failed to build if the build date contains Non-ASCII characters
> ----------------------------------------------------------------------------
>
> Key: IMPALA-11366
> URL: https://issues.apache.org/jira/browse/IMPALA-11366
> Project: IMPALA
> Issue Type: Bug
> Reporter: Quanlong Huang
> Assignee: Quanlong Huang
> Priority: Major
>
> I encountered a build failure locally:
> {code:bash}
> Building package...
> Traceback (most recent call last):
> File "setup.py", line 30, in <module>
> from impala_shell import impala_build_version
> File "/home/quanlong/workspace/Impala/shell/packaging/staging/impala_shell_package/impala_shell/impala_build_version.py", line 26
> SyntaxError: Non-ASCII character '\xe5' in file /home/quanlong/workspace/Impala/shell/packaging/staging/impala_shell_package/impala_shell/impala_build_version.py on line 26, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details{code}
> line 26 at shell/packaging/staging/impala_shell_package/impala_shell/impala_build_version.py does contain Non-ASCII characters:
> {code:python}
> 19 def get_version():
> 20 return "4.2.0-SNAPSHOT"
> 21
> 22 def get_git_hash():
> 23 return "2b9d986582198903bac63e9ce8dc31c06742d3ee"
> 24
> 25 def get_build_date():
> 26 return "2022年 06月 17日 星期五 08:26:01 CST"
> {code}
> It's generated in bin/save-version.sh using the {{date}} command:
> {code}
> BUILD_TIME=`date`
> HEADER="# Generated version information from save-version.sh"
> echo -e \
> "${HEADER}\nVERSION: ${VERSION}\nGIT_HASH: ${GIT_HASH}\nBUILD_TIME: ${BUILD_TIME}"\
> > $IMPALA_HOME/bin/version.info
> {code}
> It's legal to contain Non-ASCII characters depending on the locales.
--
This message was sent by Atlassian Jira
(v8.20.7#820007)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-all-unsubscribe@impala.apache.org
For additional commands, e-mail: issues-all-help@impala.apache.org