MCPcopy Index your code
hub / github.com/RustPython/RustPython / _init_non_posix

Function _init_non_posix

Lib/sysconfig/__init__.py:395–426  ·  view source on GitHub ↗

Initialize the module as appropriate for NT

(vars)

Source from the content-addressed store, hash-verified

393
394
395def _init_non_posix(vars):
396 """Initialize the module as appropriate for NT"""
397 # set basic install directories
398 import _winapi
399 import _sysconfig
400 vars['LIBDEST'] = get_path('stdlib')
401 vars['BINLIBDEST'] = get_path('platstdlib')
402 vars['INCLUDEPY'] = get_path('include')
403
404 # Add EXT_SUFFIX, SOABI, Py_DEBUG, and Py_GIL_DISABLED
405 vars.update(_sysconfig.config_vars())
406
407 # NOTE: ABIFLAGS is only an emulated value. It is not present during build
408 # on Windows. sys.abiflags is absent on Windows and vars['abiflags']
409 # is already widely used to calculate paths, so it should remain an
410 # empty string.
411 vars['ABIFLAGS'] = ''.join(
412 (
413 't' if vars['Py_GIL_DISABLED'] else '',
414 '_d' if vars['Py_DEBUG'] else '',
415 ),
416 )
417
418 vars['LIBDIR'] = _safe_realpath(os.path.join(get_config_var('installed_base'), 'libs'))
419 if hasattr(sys, 'dllhandle'):
420 dllhandle = _winapi.GetModuleFileName(sys.dllhandle)
421 vars['LIBRARY'] = os.path.basename(_safe_realpath(dllhandle))
422 vars['LDLIBRARY'] = vars['LIBRARY']
423 vars['EXE'] = '.exe'
424 vars['VERSION'] = _PY_VERSION_SHORT_NO_DOT
425 vars['BINDIR'] = os.path.dirname(_safe_realpath(sys.executable))
426 vars['TZPATH'] = ''
427
428#
429# public APIs

Callers 1

_init_config_varsFunction · 0.85

Calls 7

get_pathFunction · 0.85
_safe_realpathFunction · 0.85
get_config_varFunction · 0.85
hasattrFunction · 0.85
basenameMethod · 0.80
updateMethod · 0.45
joinMethod · 0.45

Tested by

no test coverage detected