Customize Python build configuration variables. Called internally from sysconfig with a mutable mapping containing name/value pairs parsed from the configured makefile used to build this interpreter. Returns the mapping updated as needed to reflect the environment in which the
(_config_vars)
| 437 | |
| 438 | |
| 439 | def customize_config_vars(_config_vars): |
| 440 | """Customize Python build configuration variables. |
| 441 | |
| 442 | Called internally from sysconfig with a mutable mapping |
| 443 | containing name/value pairs parsed from the configured |
| 444 | makefile used to build this interpreter. Returns |
| 445 | the mapping updated as needed to reflect the environment |
| 446 | in which the interpreter is running; in the case of |
| 447 | a Python from a binary installer, the installed |
| 448 | environment may be very different from the build |
| 449 | environment, i.e. different OS levels, different |
| 450 | built tools, different available CPU architectures. |
| 451 | |
| 452 | This customization is performed whenever |
| 453 | distutils.sysconfig.get_config_vars() is first |
| 454 | called. It may be used in environments where no |
| 455 | compilers are present, i.e. when installing pure |
| 456 | Python dists. Customization of compiler paths |
| 457 | and detection of unavailable archs is deferred |
| 458 | until the first extension module build is |
| 459 | requested (in distutils.sysconfig.customize_compiler). |
| 460 | |
| 461 | Currently called from distutils.sysconfig |
| 462 | """ |
| 463 | |
| 464 | if not _supports_universal_builds(): |
| 465 | # On Mac OS X before 10.4, check if -arch and -isysroot |
| 466 | # are in CFLAGS or LDFLAGS and remove them if they are. |
| 467 | # This is needed when building extensions on a 10.3 system |
| 468 | # using a universal build of python. |
| 469 | _remove_universal_flags(_config_vars) |
| 470 | |
| 471 | # Allow user to override all archs with ARCHFLAGS env var |
| 472 | _override_all_archs(_config_vars) |
| 473 | |
| 474 | # Remove references to sdks that are not found |
| 475 | _check_for_unavailable_sdk(_config_vars) |
| 476 | |
| 477 | return _config_vars |
| 478 | |
| 479 | |
| 480 | def customize_compiler(_config_vars): |
nothing calls this directly
no test coverage detected
searching dependent graphs…