MCPcopy Index your code
hub / github.com/python/cpython / customize_config_vars

Function customize_config_vars

Lib/_osx_support.py:439–477  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

437
438
439def 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
480def customize_compiler(_config_vars):

Callers

nothing calls this directly

Calls 4

_remove_universal_flagsFunction · 0.85
_override_all_archsFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…