diff options
author | 2018-05-31 19:47:30 -0700 | |
---|---|---|
committer | 2018-05-31 19:47:30 -0700 | |
commit | 905f0ca39e5a64d91c4c5d7a09bc0768dabfc454 (patch) | |
tree | d682c826d4b74915c49d09f9917ff58609ce21a8 /tools/distrib | |
parent | adc733f0249eaaabfed5ae9949af1ac416969cef (diff) | |
parent | a421c1539db7fa94a4b1ea1b8b9a0288439ef1b8 (diff) |
merge master
Diffstat (limited to 'tools/distrib')
-rwxr-xr-x | tools/distrib/check_copyright.py | 2 | ||||
-rwxr-xr-x | tools/distrib/pylint_code.sh | 15 | ||||
-rwxr-xr-x | tools/distrib/python/docgen.py | 2 | ||||
-rw-r--r-- | tools/distrib/python/grpcio_tools/grpc_version.py | 2 | ||||
-rw-r--r-- | tools/distrib/python/grpcio_tools/protoc_lib_deps.py | 2 | ||||
-rwxr-xr-x | tools/distrib/python/make_grpcio_tools.py | 4 | ||||
-rwxr-xr-x | tools/distrib/yapf_code.sh | 10 |
7 files changed, 25 insertions, 12 deletions
diff --git a/tools/distrib/check_copyright.py b/tools/distrib/check_copyright.py index 66acc733e5..09eecf471b 100755 --- a/tools/distrib/check_copyright.py +++ b/tools/distrib/check_copyright.py @@ -98,7 +98,7 @@ _EXEMPT = frozenset(( 'src/android/test/interop/gradlew.bat', )) -RE_YEAR = r'Copyright (?P<first_year>[0-9]+\-)?(?P<last_year>[0-9]+) gRPC authors.' +RE_YEAR = r'Copyright (?P<first_year>[0-9]+\-)?(?P<last_year>[0-9]+) ([Tt]he )?gRPC [Aa]uthors(\.|)' RE_LICENSE = dict( (k, r'\n'.join(LICENSE_PREFIX[k] + (RE_YEAR if re.search(RE_YEAR, line) else re.escape(line)) diff --git a/tools/distrib/pylint_code.sh b/tools/distrib/pylint_code.sh index bbacd48737..013b6660eb 100755 --- a/tools/distrib/pylint_code.sh +++ b/tools/distrib/pylint_code.sh @@ -25,15 +25,24 @@ DIRS=( 'src/python/grpcio_testing/grpc_testing' ) +TEST_DIRS=( + 'src/python/grpcio_tests/tests' +) + VIRTUALENV=python_pylint_venv +python -m virtualenv $VIRTUALENV + +PYTHON=$VIRTUALENV/bin/python -virtualenv $VIRTUALENV -PYTHON=$(realpath $VIRTUALENV/bin/python) -$PYTHON -m pip install --upgrade pip==9.0.2 +$PYTHON -m pip install --upgrade pip==10.0.1 $PYTHON -m pip install pylint==1.6.5 for dir in "${DIRS[@]}"; do $PYTHON -m pylint --rcfile=.pylintrc -rn "$dir" || exit $? done +for dir in "${TEST_DIRS[@]}"; do + $PYTHON -m pylint --rcfile=.pylintrc-tests -rn "$dir" || exit $? +done + exit 0 diff --git a/tools/distrib/python/docgen.py b/tools/distrib/python/docgen.py index 4d6fcb5d65..732d948bbc 100755 --- a/tools/distrib/python/docgen.py +++ b/tools/distrib/python/docgen.py @@ -70,7 +70,7 @@ subprocess_arguments_list = [ 'env': environment }, { - 'args': [VIRTUALENV_PIP_PATH, 'install', '--upgrade', 'pip==9.0.1'], + 'args': [VIRTUALENV_PIP_PATH, 'install', '--upgrade', 'pip==10.0.1'], 'env': environment }, { diff --git a/tools/distrib/python/grpcio_tools/grpc_version.py b/tools/distrib/python/grpcio_tools/grpc_version.py index e71f836f6d..f0367e2af4 100644 --- a/tools/distrib/python/grpcio_tools/grpc_version.py +++ b/tools/distrib/python/grpcio_tools/grpc_version.py @@ -14,4 +14,4 @@ # AUTO-GENERATED FROM `$REPO_ROOT/templates/tools/distrib/python/grpcio_tools/grpc_version.py.template`!!! -VERSION = '1.12.0.dev0' +VERSION = '1.13.0.dev0' diff --git a/tools/distrib/python/grpcio_tools/protoc_lib_deps.py b/tools/distrib/python/grpcio_tools/protoc_lib_deps.py index 2c65fca628..a0e1419ac1 100644 --- a/tools/distrib/python/grpcio_tools/protoc_lib_deps.py +++ b/tools/distrib/python/grpcio_tools/protoc_lib_deps.py @@ -20,4 +20,4 @@ PROTO_FILES=['google/protobuf/wrappers.proto', 'google/protobuf/type.proto', 'go CC_INCLUDE='third_party/protobuf/src' PROTO_INCLUDE='third_party/protobuf/src' -PROTOBUF_SUBMODULE_VERSION="2761122b810fe8861004ae785cc3ab39f384d342" +PROTOBUF_SUBMODULE_VERSION="b5fbb742af122b565925987e65c08957739976a7" diff --git a/tools/distrib/python/make_grpcio_tools.py b/tools/distrib/python/make_grpcio_tools.py index 4847233217..a6fdae28d7 100755 --- a/tools/distrib/python/make_grpcio_tools.py +++ b/tools/distrib/python/make_grpcio_tools.py @@ -98,6 +98,7 @@ def protobuf_submodule_commit_hash(): def bazel_query(query): + print('Running "bazel query %s"' % query) output = subprocess.check_output([BAZEL_DEPS, query]) return output.splitlines() @@ -156,6 +157,7 @@ def main(): shutil.copyfile(source_file, target_file) try: + print('Invoking "bazel query" to gather the protobuf dependencies.') protoc_lib_deps_content = get_deps() except Exception as error: # We allow this script to succeed even if we couldn't get the dependencies, @@ -167,6 +169,8 @@ def main(): # If we successfully got the dependencies, truncate and rewrite the deps file. with open(GRPC_PYTHON_PROTOC_LIB_DEPS, 'w') as deps_file: deps_file.write(protoc_lib_deps_content) + print('File "%s" updated.' % GRPC_PYTHON_PROTOC_LIB_DEPS) + print('Done.') if __name__ == '__main__': diff --git a/tools/distrib/yapf_code.sh b/tools/distrib/yapf_code.sh index 919e9c13d5..27c5e3129d 100755 --- a/tools/distrib/yapf_code.sh +++ b/tools/distrib/yapf_code.sh @@ -30,11 +30,11 @@ EXCLUSIONS=( VIRTUALENV=yapf_virtual_environment -virtualenv $VIRTUALENV -PYTHON=$(realpath "${VIRTUALENV}/bin/python") -$PYTHON -m pip install --upgrade pip==9.0.2 -$PYTHON -m pip install --upgrade futures -$PYTHON -m pip install yapf==0.20.0 +python -m virtualenv $VIRTUALENV +PYTHON=${VIRTUALENV}/bin/python +"$PYTHON" -m pip install --upgrade pip==10.0.1 +"$PYTHON" -m pip install --upgrade futures +"$PYTHON" -m pip install yapf==0.20.0 yapf() { local exclusion exclusion_args=() |