mirror of
https://github.com/apache/impala.git
synced 2025-12-19 09:58:28 -05:00
This adds the bin/check-python-syntax.sh script, which runs "python -m compileall" for all python files in Impala with both python2 and python3. This detects syntax errors in the python files. This will be incorporated into precommit once it is clean. This also adds future to the impala-python virtualenv. This provides the futurize script (exposed via impala-futurize), which can be used to automatically fix some py2/py3 issues. Future also provides the builtins library, which can provide python 3 functionality on python 2. Testing: - Ran impala-futurize locally - Ran the script repeatedly while fixing syntax errors Change-Id: Iae2c51bc6ddc9b6a04469ee1b8284227fed3bd45 Reviewed-on: http://gerrit.cloudera.org:8080/19550 Reviewed-by: Michael Smith <michael.smith@cloudera.com> Tested-by: Michael Smith <michael.smith@cloudera.com>
22 lines
885 B
Bash
Executable File
22 lines
885 B
Bash
Executable File
#!/bin/bash
|
|
|
|
# Licensed to the Apache Software Foundation (ASF) under one
|
|
# or more contributor license agreements. See the NOTICE file
|
|
# distributed with this work for additional information
|
|
# regarding copyright ownership. The ASF licenses this file
|
|
# to you under the Apache License, Version 2.0 (the
|
|
# "License"); you may not use this file except in compliance
|
|
# with the License. You may obtain a copy of the License at
|
|
#
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
#
|
|
# Unless required by applicable law or agreed to in writing,
|
|
# software distributed under the License is distributed on an
|
|
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
# KIND, either express or implied. See the License for the
|
|
# specific language governing permissions and limitations
|
|
# under the License.
|
|
|
|
source "$(dirname "$0")/impala-python-common.sh"
|
|
exec "$PY_ENV_DIR/bin/futurize" "$@"
|