Fix hanging build

pull/18269/head
Richard Belleville 6 years ago
parent 6dcf6d1645
commit 07bfbec8f9
  1. 6
      src/python/grpcio/commands.py

@ -217,11 +217,15 @@ class BuildExt(build_ext.build_ext):
"""Test if default compiler is okay with specifying c++ version
when invoked in C mode. GCC is okay with this, while clang is not.
"""
print("Checking if compiler okay")
cc_test = subprocess.Popen(
['cc', '-x', 'c', '-std=c++11', '-'],
stdin=subprocess.PIPE,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE)
_, cc_err = cc_test.communicate(input='int main(){return 0;}')
print("Attempting to communicate")
_, cc_err = cc_test.communicate(input=b'int main(){return 0;}')
print("Completed with compiler")
return not 'invalid argument' in str(cc_err)
# This special conditioning is here due to difference of compiler

Loading…
Cancel
Save