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