dianfu commented on a change in pull request #9851: [FLINK-14341]Fix
flink-python builds failure: no such option: --prefix
URL: https://github.com/apache/flink/pull/9851#discussion_r332857780
##########
File path: flink-python/pyflink/gen_protos.py
##########
@@ -120,10 +120,17 @@ def _install_grpcio_tools_and_generate_proto_files():
logging.warning('Installing grpcio-tools into %s', install_path)
try:
start = time.time()
- subprocess.check_call(
- [sys.executable, '-m', 'pip', 'install',
- '--prefix', install_path, '--build', build_path,
- '--upgrade', GRPC_TOOLS, "-I"])
+ pip_version = pkg_resources.get_distribution("pip").version
+ if pip_version >= '8.0.0':
Review comment:
What about using `from pkg_resources import parse_version`? as we have
already used module "pkg_resources"?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services