Back to index

python3.2  3.2.2
Functions | Variables
distutils.sysconfig Namespace Reference

Functions

def _python_build
def get_python_version
def get_python_inc
def get_python_lib
def customize_compiler
def get_config_h_filename
def get_makefile_filename
def parse_config_h
def parse_makefile
def expand_makefile_vars
def _init_posix
def _init_nt
def _init_os2
def get_config_vars
def get_config_var

Variables

tuple PREFIX = os.path.normpath(sys.prefix)
tuple EXEC_PREFIX = os.path.normpath(sys.exec_prefix)
tuple project_base = os.path.dirname(os.path.abspath(sys.executable))
tuple python_build = _python_build()
string build_flags = ''
tuple _variable_rx = re.compile("([a-zA-Z][a-zA-Z0-9_]+)\s*=\s*(.*)")
tuple _findvar1_rx = re.compile(r"\$\(([A-Za-z][A-Za-z0-9_]*)\)")
tuple _findvar2_rx = re.compile(r"\${([A-Za-z][A-Za-z0-9_]*)}")
 _config_vars = None

Detailed Description

Provide access to Python's configuration information.  The specific
configuration variables available depend heavily on the platform and
configuration.  The values may be retrieved using
get_config_var(name), and the list of variables is available via
get_config_vars().keys().  Additional convenience functions are also
available.

Written by:   Fred L. Drake, Jr.
Email:        <fdrake@acm.org>

Function Documentation

def distutils.sysconfig._init_nt ( ) [private]
Initialize the module as appropriate for NT

Definition at line 441 of file sysconfig.py.

00441 
00442 def _init_nt():
00443     """Initialize the module as appropriate for NT"""
00444     g = {}
00445     # set basic install directories
00446     g['LIBDEST'] = get_python_lib(plat_specific=0, standard_lib=1)
00447     g['BINLIBDEST'] = get_python_lib(plat_specific=1, standard_lib=1)
00448 
00449     # XXX hmmm.. a normal install puts include files here
00450     g['INCLUDEPY'] = get_python_inc(plat_specific=0)
00451 
00452     g['SO'] = '.pyd'
00453     g['EXE'] = ".exe"
00454     g['VERSION'] = get_python_version().replace(".", "")
00455     g['BINDIR'] = os.path.dirname(os.path.abspath(sys.executable))
00456 
00457     global _config_vars
00458     _config_vars = g
00459 

Here is the call graph for this function:

def distutils.sysconfig._init_os2 ( ) [private]
Initialize the module as appropriate for OS/2

Definition at line 460 of file sysconfig.py.

00460 
00461 def _init_os2():
00462     """Initialize the module as appropriate for OS/2"""
00463     g = {}
00464     # set basic install directories
00465     g['LIBDEST'] = get_python_lib(plat_specific=0, standard_lib=1)
00466     g['BINLIBDEST'] = get_python_lib(plat_specific=1, standard_lib=1)
00467 
00468     # XXX hmmm.. a normal install puts include files here
00469     g['INCLUDEPY'] = get_python_inc(plat_specific=0)
00470 
00471     g['SO'] = '.pyd'
00472     g['EXE'] = ".exe"
00473 
00474     global _config_vars
00475     _config_vars = g
00476 

Here is the call graph for this function:

Initialize the module as appropriate for POSIX systems.

Definition at line 394 of file sysconfig.py.

00394 
00395 def _init_posix():
00396     """Initialize the module as appropriate for POSIX systems."""
00397     g = {}
00398     # load the installed Makefile:
00399     try:
00400         filename = get_makefile_filename()
00401         parse_makefile(filename, g)
00402     except IOError as msg:
00403         my_msg = "invalid Python installation: unable to open %s" % filename
00404         if hasattr(msg, "strerror"):
00405             my_msg = my_msg + " (%s)" % msg.strerror
00406 
00407         raise DistutilsPlatformError(my_msg)
00408 
00409     # load the installed pyconfig.h:
00410     try:
00411         filename = get_config_h_filename()
00412         with open(filename) as file:
00413             parse_config_h(file, g)
00414     except IOError as msg:
00415         my_msg = "invalid Python installation: unable to open %s" % filename
00416         if hasattr(msg, "strerror"):
00417             my_msg = my_msg + " (%s)" % msg.strerror
00418 
00419         raise DistutilsPlatformError(my_msg)
00420 
00421     # On AIX, there are wrong paths to the linker scripts in the Makefile
00422     # -- these paths are relative to the Python source, but when installed
00423     # the scripts are in another directory.
00424     if python_build:
00425         g['LDSHARED'] = g['BLDSHARED']
00426 
00427     elif get_python_version() < '2.1':
00428         # The following two branches are for 1.5.2 compatibility.
00429         if sys.platform == 'aix4':          # what about AIX 3.x ?
00430             # Linker script is in the config directory, not in Modules as the
00431             # Makefile says.
00432             python_lib = get_python_lib(standard_lib=1)
00433             ld_so_aix = os.path.join(python_lib, 'config', 'ld_so_aix')
00434             python_exp = os.path.join(python_lib, 'config', 'python.exp')
00435 
00436             g['LDSHARED'] = "%s %s -bI:%s" % (ld_so_aix, g['CC'], python_exp)
00437 
00438     global _config_vars
00439     _config_vars = g
00440 

Here is the call graph for this function:

Definition at line 42 of file sysconfig.py.

00042 
00043 def _python_build():
00044     for fn in ("Setup.dist", "Setup.local"):
00045         if os.path.isfile(os.path.join(project_base, "Modules", fn)):
00046             return True
    return False
Do any platform-specific customization of a CCompiler instance.

Mainly needed on Unix, so we can plug in the information that
varies across Unices and is stored in Python's Makefile.

Definition at line 150 of file sysconfig.py.

00150 
00151 def customize_compiler(compiler):
00152     """Do any platform-specific customization of a CCompiler instance.
00153 
00154     Mainly needed on Unix, so we can plug in the information that
00155     varies across Unices and is stored in Python's Makefile.
00156     """
00157     if compiler.compiler_type == "unix":
00158         (cc, cxx, opt, cflags, ccshared, ldshared, so_ext, ar, ar_flags) = \
00159             get_config_vars('CC', 'CXX', 'OPT', 'CFLAGS',
00160                             'CCSHARED', 'LDSHARED', 'SO', 'AR', 'ARFLAGS')
00161 
00162         if 'CC' in os.environ:
00163             cc = os.environ['CC']
00164         if 'CXX' in os.environ:
00165             cxx = os.environ['CXX']
00166         if 'LDSHARED' in os.environ:
00167             ldshared = os.environ['LDSHARED']
00168         if 'CPP' in os.environ:
00169             cpp = os.environ['CPP']
00170         else:
00171             cpp = cc + " -E"           # not always
00172         if 'LDFLAGS' in os.environ:
00173             ldshared = ldshared + ' ' + os.environ['LDFLAGS']
00174         if 'CFLAGS' in os.environ:
00175             cflags = opt + ' ' + os.environ['CFLAGS']
00176             ldshared = ldshared + ' ' + os.environ['CFLAGS']
00177         if 'CPPFLAGS' in os.environ:
00178             cpp = cpp + ' ' + os.environ['CPPFLAGS']
00179             cflags = cflags + ' ' + os.environ['CPPFLAGS']
00180             ldshared = ldshared + ' ' + os.environ['CPPFLAGS']
00181         if 'AR' in os.environ:
00182             ar = os.environ['AR']
00183         if 'ARFLAGS' in os.environ:
00184             archiver = ar + ' ' + os.environ['ARFLAGS']
00185         else:
00186             archiver = ar + ' ' + ar_flags
00187 
00188         cc_cmd = cc + ' ' + cflags
00189         compiler.set_executables(
00190             preprocessor=cpp,
00191             compiler=cc_cmd,
00192             compiler_so=cc_cmd + ' ' + ccshared,
00193             compiler_cxx=cxx,
00194             linker_so=ldshared,
00195             linker_exe=cc,
00196             archiver=archiver)
00197 
00198         compiler.shared_lib_extension = so_ext
00199 

Here is the call graph for this function:

Here is the caller graph for this function:

Expand Makefile-style variables -- "${foo}" or "$(foo)" -- in
'string' according to 'vars' (a dictionary mapping variable names to
values).  Variables not present in 'vars' are silently expanded to the
empty string.  The variable values in 'vars' should not contain further
variable expansions; if 'vars' is the output of 'parse_makefile()',
you're fine.  Returns a variable-expanded version of 's'.

Definition at line 367 of file sysconfig.py.

00367 
00368 def expand_makefile_vars(s, vars):
00369     """Expand Makefile-style variables -- "${foo}" or "$(foo)" -- in
00370     'string' according to 'vars' (a dictionary mapping variable names to
00371     values).  Variables not present in 'vars' are silently expanded to the
00372     empty string.  The variable values in 'vars' should not contain further
00373     variable expansions; if 'vars' is the output of 'parse_makefile()',
00374     you're fine.  Returns a variable-expanded version of 's'.
00375     """
00376 
00377     # This algorithm does multiple expansion, so if vars['foo'] contains
00378     # "${bar}", it will expand ${foo} to ${bar}, and then expand
00379     # ${bar}... and so forth.  This is fine as long as 'vars' comes from
00380     # 'parse_makefile()', which takes care of such expansions eagerly,
00381     # according to make's variable expansion semantics.
00382 
00383     while True:
00384         m = _findvar1_rx.search(s) or _findvar2_rx.search(s)
00385         if m:
00386             (beg, end) = m.span()
00387             s = s[0:beg] + vars.get(m.group(1)) + s[end:]
00388         else:
00389             break
00390     return s
00391 

Here is the caller graph for this function:

Return full pathname of installed pyconfig.h file.

Definition at line 200 of file sysconfig.py.

00200 
00201 def get_config_h_filename():
00202     """Return full pathname of installed pyconfig.h file."""
00203     if python_build:
00204         if os.name == "nt":
00205             inc_dir = os.path.join(project_base, "PC")
00206         else:
00207             inc_dir = project_base
00208     else:
00209         inc_dir = get_python_inc(plat_specific=1)
00210     if get_python_version() < '2.2':
00211         config_h = 'config.h'
00212     else:
00213         # The name of the config.h file changed in 2.2
00214         config_h = 'pyconfig.h'
00215     return os.path.join(inc_dir, config_h)
00216 

Here is the call graph for this function:

Here is the caller graph for this function:

Return the value of a single variable using the dictionary
returned by 'get_config_vars()'.  Equivalent to
get_config_vars().get(name)

Definition at line 561 of file sysconfig.py.

00561 
00562 def get_config_var(name):
00563     """Return the value of a single variable using the dictionary
00564     returned by 'get_config_vars()'.  Equivalent to
00565     get_config_vars().get(name)
00566     """
00567     return get_config_vars().get(name)

Here is the call graph for this function:

Here is the caller graph for this function:

With no arguments, return a dictionary of all configuration
variables relevant for the current platform.  Generally this includes
everything needed to build extensions and install both pure modules and
extensions.  On Unix, this means every variable defined in Python's
installed Makefile; on Windows and Mac OS it's a much smaller set.

With arguments, return a list of values that result from looking up
each argument in the configuration variable dictionary.

Definition at line 477 of file sysconfig.py.

00477 
00478 def get_config_vars(*args):
00479     """With no arguments, return a dictionary of all configuration
00480     variables relevant for the current platform.  Generally this includes
00481     everything needed to build extensions and install both pure modules and
00482     extensions.  On Unix, this means every variable defined in Python's
00483     installed Makefile; on Windows and Mac OS it's a much smaller set.
00484 
00485     With arguments, return a list of values that result from looking up
00486     each argument in the configuration variable dictionary.
00487     """
00488     global _config_vars
00489     if _config_vars is None:
00490         func = globals().get("_init_" + os.name)
00491         if func:
00492             func()
00493         else:
00494             _config_vars = {}
00495 
00496         # Normalized versions of prefix and exec_prefix are handy to have;
00497         # in fact, these are the standard versions used most places in the
00498         # Distutils.
00499         _config_vars['prefix'] = PREFIX
00500         _config_vars['exec_prefix'] = EXEC_PREFIX
00501 
00502         # Convert srcdir into an absolute path if it appears necessary.
00503         # Normally it is relative to the build directory.  However, during
00504         # testing, for example, we might be running a non-installed python
00505         # from a different directory.
00506         if python_build and os.name == "posix":
00507             base = os.path.dirname(os.path.abspath(sys.executable))
00508             if (not os.path.isabs(_config_vars['srcdir']) and
00509                 base != os.getcwd()):
00510                 # srcdir is relative and we are not in the same directory
00511                 # as the executable. Assume executable is in the build
00512                 # directory and make srcdir absolute.
00513                 srcdir = os.path.join(base, _config_vars['srcdir'])
00514                 _config_vars['srcdir'] = os.path.normpath(srcdir)
00515 
00516         if sys.platform == 'darwin':
00517             kernel_version = os.uname()[2] # Kernel version (8.4.3)
00518             major_version = int(kernel_version.split('.')[0])
00519 
00520             if major_version < 8:
00521                 # On Mac OS X before 10.4, check if -arch and -isysroot
00522                 # are in CFLAGS or LDFLAGS and remove them if they are.
00523                 # This is needed when building extensions on a 10.3 system
00524                 # using a universal build of python.
00525                 for key in ('LDFLAGS', 'BASECFLAGS',
00526                         # a number of derived variables. These need to be
00527                         # patched up as well.
00528                         'CFLAGS', 'PY_CFLAGS', 'BLDSHARED'):
00529                     flags = _config_vars[key]
00530                     flags = re.sub('-arch\s+\w+\s', ' ', flags, re.ASCII)
00531                     flags = re.sub('-isysroot [^ \t]*', ' ', flags)
00532                     _config_vars[key] = flags
00533 
00534             else:
00535 
00536                 # Allow the user to override the architecture flags using
00537                 # an environment variable.
00538                 # NOTE: This name was introduced by Apple in OSX 10.5 and
00539                 # is used by several scripting languages distributed with
00540                 # that OS release.
00541 
00542                 if 'ARCHFLAGS' in os.environ:
00543                     arch = os.environ['ARCHFLAGS']
00544                     for key in ('LDFLAGS', 'BASECFLAGS',
00545                         # a number of derived variables. These need to be
00546                         # patched up as well.
00547                         'CFLAGS', 'PY_CFLAGS', 'BLDSHARED'):
00548 
00549                         flags = _config_vars[key]
00550                         flags = re.sub('-arch\s+\w+\s', ' ', flags)
00551                         flags = flags + ' ' + arch
00552                         _config_vars[key] = flags
00553 
00554     if args:
00555         vals = []
00556         for name in args:
00557             vals.append(_config_vars.get(name))
00558         return vals
00559     else:
00560         return _config_vars

Here is the call graph for this function:

Here is the caller graph for this function:

Return full pathname of installed Makefile from the Python build.

Definition at line 217 of file sysconfig.py.

00217 
00218 def get_makefile_filename():
00219     """Return full pathname of installed Makefile from the Python build."""
00220     if python_build:
00221         return os.path.join(os.path.dirname(sys.executable), "Makefile")
00222     lib_dir = get_python_lib(plat_specific=1, standard_lib=1)
00223     config_file = 'config-{}{}'.format(get_python_version(), build_flags)
00224     return os.path.join(lib_dir, config_file, 'Makefile')
00225 

Here is the call graph for this function:

Here is the caller graph for this function:

def distutils.sysconfig.get_python_inc (   plat_specific = 0,
  prefix = None 
)
Return the directory containing installed Python header files.

If 'plat_specific' is false (the default), this is the path to the
non-platform-specific header files, i.e. Python.h and so on;
otherwise, this is the path to platform-specific header files
(namely pyconfig.h).

If 'prefix' is supplied, use it instead of sys.prefix or
sys.exec_prefix -- i.e., ignore 'plat_specific'.

Definition at line 69 of file sysconfig.py.

00069 
00070 def get_python_inc(plat_specific=0, prefix=None):
00071     """Return the directory containing installed Python header files.
00072 
00073     If 'plat_specific' is false (the default), this is the path to the
00074     non-platform-specific header files, i.e. Python.h and so on;
00075     otherwise, this is the path to platform-specific header files
00076     (namely pyconfig.h).
00077 
00078     If 'prefix' is supplied, use it instead of sys.prefix or
00079     sys.exec_prefix -- i.e., ignore 'plat_specific'.
00080     """
00081     if prefix is None:
00082         prefix = plat_specific and EXEC_PREFIX or PREFIX
00083     if os.name == "posix":
00084         if python_build:
00085             # Assume the executable is in the build directory.  The
00086             # pyconfig.h file should be in the same directory.  Since
00087             # the build directory may not be the source directory, we
00088             # must use "srcdir" from the makefile to find the "Include"
00089             # directory.
00090             base = os.path.dirname(os.path.abspath(sys.executable))
00091             if plat_specific:
00092                 return base
00093             else:
00094                 incdir = os.path.join(get_config_var('srcdir'), 'Include')
00095                 return os.path.normpath(incdir)
00096         python_dir = 'python' + get_python_version() + build_flags
00097         return os.path.join(prefix, "include", python_dir)
00098     elif os.name == "nt":
00099         return os.path.join(prefix, "include")
00100     elif os.name == "os2":
00101         return os.path.join(prefix, "Include")
00102     else:
00103         raise DistutilsPlatformError(
00104             "I don't know where Python installs its C header files "
00105             "on platform '%s'" % os.name)
00106 

Here is the call graph for this function:

Here is the caller graph for this function:

def distutils.sysconfig.get_python_lib (   plat_specific = 0,
  standard_lib = 0,
  prefix = None 
)
Return the directory containing the Python library (standard or
site additions).

If 'plat_specific' is true, return the directory containing
platform-specific modules, i.e. any module from a non-pure-Python
module distribution; otherwise, return the platform-shared library
directory.  If 'standard_lib' is true, return the directory
containing standard Python library modules; otherwise, return the
directory for site-specific modules.

If 'prefix' is supplied, use it instead of sys.prefix or
sys.exec_prefix -- i.e., ignore 'plat_specific'.

Definition at line 107 of file sysconfig.py.

00107 
00108 def get_python_lib(plat_specific=0, standard_lib=0, prefix=None):
00109     """Return the directory containing the Python library (standard or
00110     site additions).
00111 
00112     If 'plat_specific' is true, return the directory containing
00113     platform-specific modules, i.e. any module from a non-pure-Python
00114     module distribution; otherwise, return the platform-shared library
00115     directory.  If 'standard_lib' is true, return the directory
00116     containing standard Python library modules; otherwise, return the
00117     directory for site-specific modules.
00118 
00119     If 'prefix' is supplied, use it instead of sys.prefix or
00120     sys.exec_prefix -- i.e., ignore 'plat_specific'.
00121     """
00122     if prefix is None:
00123         prefix = plat_specific and EXEC_PREFIX or PREFIX
00124 
00125     if os.name == "posix":
00126         libpython = os.path.join(prefix,
00127                                  "lib", "python" + get_python_version())
00128         if standard_lib:
00129             return libpython
00130         else:
00131             return os.path.join(libpython, "site-packages")
00132     elif os.name == "nt":
00133         if standard_lib:
00134             return os.path.join(prefix, "Lib")
00135         else:
00136             if get_python_version() < "2.2":
00137                 return prefix
00138             else:
00139                 return os.path.join(prefix, "Lib", "site-packages")
00140     elif os.name == "os2":
00141         if standard_lib:
00142             return os.path.join(prefix, "Lib")
00143         else:
00144             return os.path.join(prefix, "Lib", "site-packages")
00145     else:
00146         raise DistutilsPlatformError(
00147             "I don't know where Python installs its library "
00148             "on platform '%s'" % os.name)
00149 

Here is the call graph for this function:

Here is the caller graph for this function:

Return a string containing the major and minor Python version,
leaving off the patchlevel.  Sample return values could be '1.5'
or '2.2'.

Definition at line 61 of file sysconfig.py.

00061 
00062 def get_python_version():
00063     """Return a string containing the major and minor Python version,
00064     leaving off the patchlevel.  Sample return values could be '1.5'
00065     or '2.2'.
00066     """
00067     return sys.version[:3]
00068 

Here is the caller graph for this function:

def distutils.sysconfig.parse_config_h (   fp,
  g = None 
)
Parse a config.h-style file.

A dictionary containing name/value pairs is returned.  If an
optional dictionary is passed in as the second argument, it is
used instead of a new dictionary.

Definition at line 226 of file sysconfig.py.

00226 
00227 def parse_config_h(fp, g=None):
00228     """Parse a config.h-style file.
00229 
00230     A dictionary containing name/value pairs is returned.  If an
00231     optional dictionary is passed in as the second argument, it is
00232     used instead of a new dictionary.
00233     """
00234     if g is None:
00235         g = {}
00236     define_rx = re.compile("#define ([A-Z][A-Za-z0-9_]+) (.*)\n")
00237     undef_rx = re.compile("/[*] #undef ([A-Z][A-Za-z0-9_]+) [*]/\n")
00238     #
00239     while True:
00240         line = fp.readline()
00241         if not line:
00242             break
00243         m = define_rx.match(line)
00244         if m:
00245             n, v = m.group(1, 2)
00246             try: v = int(v)
00247             except ValueError: pass
00248             g[n] = v
00249         else:
00250             m = undef_rx.match(line)
00251             if m:
00252                 g[m.group(1)] = 0
00253     return g
00254 
00255 
00256 # Regexes needed for parsing Makefile (and similar syntaxes,
# like old-style Setup files).

Here is the call graph for this function:

Here is the caller graph for this function:

def distutils.sysconfig.parse_makefile (   fn,
  g = None 
)
Parse a Makefile-style file.

A dictionary containing name/value pairs is returned.  If an
optional dictionary is passed in as the second argument, it is
used instead of a new dictionary.

Definition at line 261 of file sysconfig.py.

00261 
00262 def parse_makefile(fn, g=None):
00263     """Parse a Makefile-style file.
00264 
00265     A dictionary containing name/value pairs is returned.  If an
00266     optional dictionary is passed in as the second argument, it is
00267     used instead of a new dictionary.
00268     """
00269     from distutils.text_file import TextFile
00270     fp = TextFile(fn, strip_comments=1, skip_blanks=1, join_lines=1, errors="surrogateescape")
00271 
00272     if g is None:
00273         g = {}
00274     done = {}
00275     notdone = {}
00276 
00277     while True:
00278         line = fp.readline()
00279         if line is None: # eof
00280             break
00281         m = _variable_rx.match(line)
00282         if m:
00283             n, v = m.group(1, 2)
00284             v = v.strip()
00285             # `$$' is a literal `$' in make
00286             tmpv = v.replace('$$', '')
00287 
00288             if "$" in tmpv:
00289                 notdone[n] = v
00290             else:
00291                 try:
00292                     v = int(v)
00293                 except ValueError:
00294                     # insert literal `$'
00295                     done[n] = v.replace('$$', '$')
00296                 else:
00297                     done[n] = v
00298 
00299     # Variables with a 'PY_' prefix in the makefile. These need to
00300     # be made available without that prefix through sysconfig.
00301     # Special care is needed to ensure that variable expansion works, even
00302     # if the expansion uses the name without a prefix.
00303     renamed_variables = ('CFLAGS', 'LDFLAGS', 'CPPFLAGS')
00304 
00305     # do variable interpolation here
00306     while notdone:
00307         for name in list(notdone):
00308             value = notdone[name]
00309             m = _findvar1_rx.search(value) or _findvar2_rx.search(value)
00310             if m:
00311                 n = m.group(1)
00312                 found = True
00313                 if n in done:
00314                     item = str(done[n])
00315                 elif n in notdone:
00316                     # get it on a subsequent round
00317                     found = False
00318                 elif n in os.environ:
00319                     # do it like make: fall back to environment
00320                     item = os.environ[n]
00321 
00322                 elif n in renamed_variables:
00323                     if name.startswith('PY_') and name[3:] in renamed_variables:
00324                         item = ""
00325 
00326                     elif 'PY_' + n in notdone:
00327                         found = False
00328 
00329                     else:
00330                         item = str(done['PY_' + n])
00331                 else:
00332                     done[n] = item = ""
00333                 if found:
00334                     after = value[m.end():]
00335                     value = value[:m.start()] + item + after
00336                     if "$" in after:
00337                         notdone[name] = value
00338                     else:
00339                         try: value = int(value)
00340                         except ValueError:
00341                             done[name] = value.strip()
00342                         else:
00343                             done[name] = value
00344                         del notdone[name]
00345 
00346                         if name.startswith('PY_') \
00347                             and name[3:] in renamed_variables:
00348 
00349                             name = name[3:]
00350                             if name not in done:
00351                                 done[name] = value
00352             else:
00353                 # bogus variable reference; just drop it since we can't deal
00354                 del notdone[name]
00355 
00356     fp.close()
00357 
00358     # strip spurious spaces
00359     for k, v in done.items():
00360         if isinstance(v, str):
00361             done[k] = v.strip()
00362 
00363     # save the results in the global dictionary
00364     g.update(done)
00365     return g
00366 

Here is the caller graph for this function:


Variable Documentation

Definition at line 392 of file sysconfig.py.

tuple distutils.sysconfig._findvar1_rx = re.compile(r"\$\(([A-Za-z][A-Za-z0-9_]*)\)")

Definition at line 258 of file sysconfig.py.

tuple distutils.sysconfig._findvar2_rx = re.compile(r"\${([A-Za-z][A-Za-z0-9_]*)}")

Definition at line 259 of file sysconfig.py.

tuple distutils.sysconfig._variable_rx = re.compile("([a-zA-Z][a-zA-Z0-9_]+)\s*=\s*(.*)")

Definition at line 257 of file sysconfig.py.

Definition at line 52 of file sysconfig.py.

Definition at line 20 of file sysconfig.py.

Definition at line 19 of file sysconfig.py.

tuple distutils.sysconfig.project_base = os.path.dirname(os.path.abspath(sys.executable))

Definition at line 25 of file sysconfig.py.

Definition at line 47 of file sysconfig.py.