|
11 | 11 |
|
12 | 12 | import pkg_resources
|
13 | 13 | import platform
|
14 |
| -from distutils.sysconfig import get_config_var |
| 14 | +from distutils.sysconfig import get_config_vars |
15 | 15 | import sys
|
16 | 16 | import shutil
|
17 | 17 | from distutils.version import LooseVersion
|
@@ -442,19 +442,18 @@ def run(self):
|
442 | 442 | if debugging_symbols_requested:
|
443 | 443 | extra_compile_args.append('-g')
|
444 | 444 |
|
445 |
| -# For mac, ensure extensions are built for macos 10.9 when compiling on a |
446 |
| -# 10.9 system or above, overriding distuitls behaviour which is to target |
447 |
| -# the version that python was built for. This may be overridden by setting |
448 |
| -# MACOSX_DEPLOYMENT_TARGET before calling setup.py |
| 445 | +# For mac, ensure extensions are built for at least macOS 10.9 when compiling |
| 446 | +# on a 10.9 system or above, overriding CPython distuitls behaviour which is |
| 447 | +# to target the version that python was built for. This may be overridden by |
| 448 | +# setting MACOSX_DEPLOYMENT_TARGET before calling setup.py |
449 | 449 | if is_platform_mac():
|
450 | 450 | if 'MACOSX_DEPLOYMENT_TARGET' not in os.environ:
|
451 | 451 | current_system = LooseVersion(platform.mac_ver()[0])
|
452 | 452 | python_target = LooseVersion(
|
453 |
| - get_config_var('MACOSX_DEPLOYMENT_TARGET')) |
| 453 | + get_config_vars().get('MACOSX_DEPLOYMENT_TARGET', current_system)) |
454 | 454 | if python_target < '10.9' and current_system >= '10.9':
|
455 | 455 | os.environ['MACOSX_DEPLOYMENT_TARGET'] = '10.9'
|
456 | 456 |
|
457 |
| - |
458 | 457 | # enable coverage by building cython files by setting the environment variable
|
459 | 458 | # "PANDAS_CYTHON_COVERAGE" (with a Truthy value) or by running build_ext
|
460 | 459 | # with `--with-cython-coverage`enabled
|
|
0 commit comments