You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2019/10/09 07:06:09 UTC

[GitHub] [flink] hequn8128 commented on a change in pull request #9851: [FLINK-14341]Fix flink-python builds failure: no such option: --prefix

hequn8128 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_r332854468
 
 

 ##########
 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:
   We can't do string compare here, how about use version.parse() to compare:
   ```
           from packaging import version
           if version.parse(pip_version) >= version.parse('8.0.0'):
   ```
   

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services