MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / _expand_vars

Function _expand_vars

tools/python-3.11.9-amd64/Lib/sysconfig.py:261–276  ·  view source on GitHub ↗
(scheme, vars)

Source from the content-addressed store, hash-verified

259
260
261def _expand_vars(scheme, vars):
262 res = {}
263 if vars is None:
264 vars = {}
265 _extend_dict(vars, get_config_vars())
266 if os.name == 'nt':
267 # On Windows we want to substitute 'lib' for schemes rather
268 # than the native value (without modifying vars, in case it
269 # was passed in)
270 vars = vars | {'platlibdir': 'lib'}
271
272 for key, value in _INSTALL_SCHEMES[scheme].items():
273 if os.name in ('posix', 'nt'):
274 value = os.path.expanduser(value)
275 res[key] = os.path.normpath(_subst_vars(value, vars))
276 return res
277
278
279def _get_preferred_schemes():

Callers 1

get_pathsFunction · 0.85

Calls 5

_extend_dictFunction · 0.85
_subst_varsFunction · 0.85
expanduserMethod · 0.80
get_config_varsFunction · 0.70
itemsMethod · 0.45

Tested by

no test coverage detected