From d55154f7b85b183ba6af2438d6265aaf7e696b78 Mon Sep 17 00:00:00 2001 From: Esun Kim Date: Fri, 4 Oct 2019 17:25:58 -0700 Subject: [PATCH] Reformat code --- tools/distrib/python/grpcio_tools/setup.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/tools/distrib/python/grpcio_tools/setup.py b/tools/distrib/python/grpcio_tools/setup.py index b5d5786eff0..57075834154 100644 --- a/tools/distrib/python/grpcio_tools/setup.py +++ b/tools/distrib/python/grpcio_tools/setup.py @@ -65,18 +65,21 @@ PY3 = sys.version_info.major == 3 # to have been generated by building first *with* Cython support. BUILD_WITH_CYTHON = os.environ.get('GRPC_PYTHON_BUILD_WITH_CYTHON', False) + def check_linker_need_libatomic(): """Test if linker on system needs libatomic. """ code_test = (b'#include \n' + b'int main() { return std::atomic{}; }') - cc_test = subprocess.Popen(['cc', '-x', 'c++', '-std=c++11', '-'], - stdin=PIPE, - stdout=PIPE, - stderr=PIPE) + cc_test = subprocess.Popen( + ['cc', '-x', 'c++', '-std=c++11', '-'], + stdin=PIPE, + stdout=PIPE, + stderr=PIPE) cc_test.communicate(input=code_test) return cc_test.returncode != 0 + # There are some situations (like on Windows) where CC, CFLAGS, and LDFLAGS are # entirely ignored/dropped/forgotten by distutils and its Cygwin/MinGW support. # We use these environment variables to thus get around that without locking