Imported Upstream version 1.34.0
[platform/upstream/grpc.git] / tools / distrib / python / grpcio_tools / setup.py
index f216eeb..164088b 100644 (file)
@@ -150,15 +150,15 @@ elif "linux" in sys.platform or "darwin" in sys.platform:
     DEFINE_MACROS += (('HAVE_PTHREAD', 1),)
 
 # By default, Python3 distutils enforces compatibility of
-# c plugins (.so files) with the OSX version Python3 was built with.
-# For Python3.4, this is OSX 10.6, but we need Thread Local Support (__thread)
-if 'darwin' in sys.platform and PY3:
+# c plugins (.so files) with the OSX version Python was built with.
+# We need OSX 10.10, the oldest which supports C++ thread_local.
+if 'darwin' in sys.platform:
     mac_target = sysconfig.get_config_var('MACOSX_DEPLOYMENT_TARGET')
     if mac_target and (pkg_resources.parse_version(mac_target) <
-                       pkg_resources.parse_version('10.9.0')):
-        os.environ['MACOSX_DEPLOYMENT_TARGET'] = '10.9'
+                       pkg_resources.parse_version('10.10.0')):
+        os.environ['MACOSX_DEPLOYMENT_TARGET'] = '10.10'
         os.environ['_PYTHON_HOST_PLATFORM'] = re.sub(
-            r'macosx-[0-9]+\.[0-9]+-(.+)', r'macosx-10.9-\1',
+            r'macosx-[0-9]+\.[0-9]+-(.+)', r'macosx-10.10-\1',
             util.get_platform())
 
 
@@ -232,6 +232,7 @@ setuptools.setup(
     install_requires=[
         'protobuf>=3.5.0.post1, < 4.0dev',
         'grpcio>={version}'.format(version=grpc_version.VERSION),
+        'setuptools',
     ],
     package_data=package_data(),
 )