aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/python/grpcio/commands.py
diff options
context:
space:
mode:
authorGravatar ncteisen <ncteisen@gmail.com>2018-08-28 12:53:57 -0700
committerGravatar ncteisen <ncteisen@gmail.com>2018-08-28 12:53:57 -0700
commit4b5b019d5644affef122e06c6898811286850b8d (patch)
tree73c601dc31c436e3d800a846d08b9ace7ff05235 /src/python/grpcio/commands.py
parentb8f030bc0b507903e9d156fb44d161015273d0c6 (diff)
parentee65a5eaee45a765d1d4176a797bb8288faeb180 (diff)
Merge branch 'master' of https://github.com/grpc/grpc into channelz-subchannels
Diffstat (limited to 'src/python/grpcio/commands.py')
-rw-r--r--src/python/grpcio/commands.py11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/python/grpcio/commands.py b/src/python/grpcio/commands.py
index 4c2ebaeaea..0a3097111f 100644
--- a/src/python/grpcio/commands.py
+++ b/src/python/grpcio/commands.py
@@ -265,8 +265,17 @@ class BuildExt(build_ext.build_ext):
os.path.join(target_path, 'libgpr.a'),
os.path.join(target_path, 'libgrpc.a')
]
+ # Running make separately for Mac means we lose all
+ # Extension.define_macros configured in setup.py. Re-add the macro
+ # for gRPC Core's fork handlers.
+ # TODO(ericgribkoff) Decide what to do about the other missing core
+ # macros, including GRPC_ENABLE_FORK_SUPPORT, which defaults to 1
+ # on Linux but remains unset on Mac.
+ extra_defines = [
+ 'EXTRA_DEFINES="GRPC_POSIX_FORK_ALLOW_PTHREAD_ATFORK=1"'
+ ]
make_process = subprocess.Popen(
- ['make'] + targets,
+ ['make'] + extra_defines + targets,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE)
make_out, make_err = make_process.communicate()