|
@@ -190,7 +190,13 @@ if __name__ == '__main__':
|
|
|
# C++ projects must now migrate to libc++ and are recommended to set a
|
|
|
# deployment target of macOS 10.9 or later, or iOS 7 or later.
|
|
|
if sys.platform == 'darwin':
|
|
|
- os.environ['MACOSX_DEPLOYMENT_TARGET'] = '10.9'
|
|
|
+ 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'
|
|
|
+ os.environ['_PYTHON_HOST_PLATFORM'] = re.sub(
|
|
|
+ r'macosx-[0-9]+\.[0-9]+-(.+)', r'macosx-10.9-\1',
|
|
|
+ util.get_platform())
|
|
|
|
|
|
# https://github.com/Theano/Theano/issues/4926
|
|
|
if sys.platform == 'win32':
|