Initialize the module as appropriate for NT
(vars)
| 393 | |
| 394 | |
| 395 | def _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 |
no test coverage detected