diff options
| author | Jason R. Coombs <jaraco@jaraco.com> | 2021-04-24 14:57:54 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-04-24 14:57:54 -0400 |
| commit | 7423f0767acf5f8713196c5105ece867ec9e7a55 (patch) | |
| tree | 00a5abb0b00d2b250eada633fb79edd511ab7da7 | |
| parent | d8a8d8547398b6246f9b6229343d9c752dd33729 (diff) | |
| parent | 143ebe51b36c0c4723216c08473d6baf31fc6f41 (diff) | |
| download | python-setuptools-git-7423f0767acf5f8713196c5105ece867ec9e7a55.tar.gz | |
Merge pull request #36 from jmroot/relax-mdt-check
Relax MACOSX_DEPLOYMENT_TARGET check
| -rw-r--r-- | distutils/spawn.py | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/distutils/spawn.py b/distutils/spawn.py index a73b8b9b..b012d00d 100644 --- a/distutils/spawn.py +++ b/distutils/spawn.py @@ -60,13 +60,17 @@ def spawn(cmd, search_path=1, verbose=0, dry_run=0, env=None): if _cfg_target: _cfg_target_split = [int(x) for x in _cfg_target.split('.')] if _cfg_target: - # ensure that the deployment target of build process is not less - # than that used when the interpreter was built. This ensures - # extension modules are built with correct compatibility values + # Ensure that the deployment target of the build process is not + # less than 10.3 if the interpreter was built for 10.3 or later. + # This ensures extension modules are built with correct + # compatibility values, specifically LDSHARED which can use + # '-undefined dynamic_lookup' which only works on >= 10.3. cur_target = os.environ.get('MACOSX_DEPLOYMENT_TARGET', _cfg_target) - if _cfg_target_split > [int(x) for x in cur_target.split('.')]: + cur_target_split = [int(x) for x in cur_target.split('.')] + if _cfg_target_split[:2] >= [10, 3] and cur_target_split[:2] < [10, 3]: my_msg = ('$MACOSX_DEPLOYMENT_TARGET mismatch: ' - 'now "%s" but "%s" during configure' + 'now "%s" but "%s" during configure;' + 'must use 10.3 or later' % (cur_target, _cfg_target)) raise DistutilsPlatformError(my_msg) env.update(MACOSX_DEPLOYMENT_TARGET=cur_target) |
