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