diff options
author | 2017-04-14 15:18:28 -0700 | |
---|---|---|
committer | 2017-04-14 15:18:28 -0700 | |
commit | d69115507e829af650e376bd28c6d840194da799 (patch) | |
tree | 3b05bac9b6394277406bc0f6fd497400fb8e7645 /src | |
parent | 56c23f11b04192a977fdd9a4cbb21259f4a87794 (diff) | |
parent | b4a9b8e7a26d9c4a0f6b3b2ac286897ee6dcf73b (diff) |
Merge branch 'c++lame' of github.com:ctiller/grpc into c++lame
Diffstat (limited to 'src')
-rw-r--r-- | src/python/grpcio/commands.py | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/python/grpcio/commands.py b/src/python/grpcio/commands.py index f196b028a7..f6a66f1f41 100644 --- a/src/python/grpcio/commands.py +++ b/src/python/grpcio/commands.py @@ -266,6 +266,25 @@ class BuildExt(build_ext.build_ext): LINK_OPTIONS = {} def build_extensions(self): + if "darwin" in sys.platform: + target_path = os.path.abspath( + os.path.join(os.path.dirname(os.path.realpath(__file__)), + '..', '..', '..', 'libs', 'opt')) + targets = [os.path.join(target_path, 'libboringssl.a'), + os.path.join(target_path, 'libares.a'), + os.path.join(target_path, 'libgpr.a'), + os.path.join(target_path, 'libgrpc.a')] + make_process = subprocess.Popen(['make'] + targets, + stdout=subprocess.PIPE, + stderr=subprocess.PIPE) + make_out, make_err = make_process.communicate() + if make_out and make_process.returncode != 0: + sys.stdout.write(make_out + '\n') + if make_err: + sys.stderr.write(make_err + '\n') + if make_process.returncode != 0: + raise Exception("make command failed!") + compiler = self.compiler.compiler_type if compiler in BuildExt.C_OPTIONS: for extension in self.extensions: |