diff options
author | Masood Malekghassemi <atash@google.com> | 2016-07-15 23:17:41 -0700 |
---|---|---|
committer | Masood Malekghassemi <atash@google.com> | 2016-07-18 19:21:06 -0700 |
commit | 398b06e8432e5e9007349b7c89ae6b67e02c1035 (patch) | |
tree | 3ed2c8b6fe2357ec47d6531b3bbdb6413203b129 /tools | |
parent | 5e93d3fffa5856a588cae76c61472b74e51ce469 (diff) |
Force the Python host version on Mac OS X
Diffstat (limited to 'tools')
-rw-r--r-- | tools/distrib/python/grpcio_tools/setup.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/distrib/python/grpcio_tools/setup.py b/tools/distrib/python/grpcio_tools/setup.py index a00ce01110..8082c7a665 100644 --- a/tools/distrib/python/grpcio_tools/setup.py +++ b/tools/distrib/python/grpcio_tools/setup.py @@ -28,11 +28,13 @@ # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from distutils import extension +from distutils import util import errno import os import os.path import pkg_resources import platform +import re import shlex import shutil import sys @@ -83,6 +85,10 @@ if 'darwin' in sys.platform and PY3: if mac_target and (pkg_resources.parse_version(mac_target) < pkg_resources.parse_version('10.9.0')): os.environ['MACOSX_DEPLOYMENT_TARGET'] = '10.9' + os.environ['_PYTHON_HOST_PLATFORM'] = re.sub( + r'macosx-[0-9]+\.[0-9]+-(.+)', + r'macosx-10.9-\1', + util.get_platform()) def package_data(): tools_path = GRPC_PYTHON_TOOLS_PACKAGE.replace('.', os.path.sep) |