diff options
| author | Jason R. Coombs <jaraco@jaraco.com> | 2021-04-25 20:18:25 -0400 |
|---|---|---|
| committer | Jason R. Coombs <jaraco@jaraco.com> | 2021-04-25 20:18:25 -0400 |
| commit | ed288d05d4a57165c48f384e4d5316b4f8e2ac84 (patch) | |
| tree | 9ba3abfb5a7dc35a8141a30bfc102c7785434e4c /setuptools/_distutils/spawn.py | |
| parent | be0f7f5cdab66335ca3462129c8f519b3a60840e (diff) | |
| parent | 7423f0767acf5f8713196c5105ece867ec9e7a55 (diff) | |
| download | python-setuptools-git-ed288d05d4a57165c48f384e4d5316b4f8e2ac84.tar.gz | |
Merge https://github.com/pypa/distutils into distutils-refresh
Diffstat (limited to 'setuptools/_distutils/spawn.py')
| -rw-r--r-- | setuptools/_distutils/spawn.py | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/setuptools/_distutils/spawn.py b/setuptools/_distutils/spawn.py index fc592d4a..b012d00d 100644 --- a/setuptools/_distutils/spawn.py +++ b/setuptools/_distutils/spawn.py @@ -40,7 +40,7 @@ def spawn(cmd, search_path=1, verbose=0, dry_run=0, env=None): # in, protect our %-formatting code against horrible death cmd = list(cmd) - log.info(' '.join(cmd)) + log.info(subprocess.list2cmdline(cmd)) if dry_run: return @@ -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) |
