Lines Matching +full:- +full:- +full:dllname
5 /* ----------------------------------------------------------------
10 pythonXY._pth file alongside the program overrides these rules - see
18 * We look in the registry for "application paths" - that is, sub-keys
20 order of sub-key processing is undefined).
26 * We attempt to locate the "Python Home" - if the PYTHONHOME env var
29 - If we DO have a Python Home: The relevant sub-directories (Lib,
31 - If we DO NOT have a Python Home, the core Python Path is
35 * Iff - we can not locate the Python Home, have not had a PYTHONPATH
76 either a 'EXENAME._pth' or 'DLLNAME._pth' file, optionally including
79 ---------------------------------------------------------------- */
160 --i; in reduce()
176 --i; in change_ext()
180 return -1; in change_ext()
189 return -1; in change_ext()
200 return -1; in change_ext()
214 /* Is module -- check for .pyc too.
215 Assumes 'filename' MAXPATHLEN+1 bytes long -
244 NUL-terminated string with no more than MAXPATHLEN characters (not counting
247 guaranteed that buffer will still be a NUL-terminated string with no more
261 and ".." to produce a direct, well-formed path. */
316 return -1; in get_dllpath()
333 XXX - this code is pretty strange, as it used to also
354 /* Tried to use sysget("winver") but here is too early :-( */ in getpythonregpath()
358 sizeof(WCHAR)*(versionLen-1) + in getpythonregpath()
365 memcpy_s(keyBufPtr, keyBufLen, keyPrefix, sizeof(keyPrefix)-sizeof(WCHAR)); in getpythonregpath()
366 keyBufPtr += Py_ARRAY_LENGTH(keyPrefix) - 1; in getpythonregpath()
396 /* Loop over all subkeys, allocating a temp sub-buffer. */ in getpythonregpath()
401 /* Get the sub-key name */ in getpythonregpath()
407 /* Open the sub-key */ in getpythonregpath()
443 dataSize--; in getpythonregpath()
450 dataSize -= (DWORD)len; in getpythonregpath()
460 dataSize--; in getpythonregpath()
462 /* Now append the core path entries - in getpythonregpath()
472 /* And set the result - caller must free */ in getpythonregpath()
509 if (pathconfig->base_executable == NULL) { in get_program_full_path()
510 pathconfig->base_executable = PyMem_RawMalloc( in get_program_full_path()
512 if (pathconfig->base_executable == NULL) { in get_program_full_path()
516 status = canonicalize(pathconfig->base_executable, in get_program_full_path()
524 /* bpo-35873: Clear the environment variable to avoid it being in get_program_full_path()
529 if (pathconfig->program_full_path == NULL) { in get_program_full_path()
530 pathconfig->program_full_path = PyMem_RawMalloc( in get_program_full_path()
532 if (pathconfig->program_full_path == NULL) { in get_program_full_path()
536 status = canonicalize(pathconfig->program_full_path, in get_program_full_path()
562 pathconfig->isolated = 1; in read_pth_file()
563 pathconfig->site_import = 0; in read_pth_file()
592 pathconfig->site_import = 1; in read_pth_file()
601 DWORD wn = MultiByteToWideChar(CP_UTF8, 0, line, -1, NULL, 0); in read_pth_file()
607 wn = MultiByteToWideChar(CP_UTF8, 0, line, -1, wline, wn + 1); in read_pth_file()
647 if (pathconfig->module_search_path == NULL) { in read_pth_file()
648 pathconfig->module_search_path = _PyMem_RawWcsdup(buf); in read_pth_file()
649 if (pathconfig->module_search_path == NULL) { in read_pth_file()
677 if (pathconfig->program_full_path[0] && in get_pth_filename()
678 !change_ext(filename, pathconfig->program_full_path, L"._pth") && in get_pth_filename()
754 if (calculate->home == NULL || *calculate->home == '\0') { in calculate_home_prefix()
758 calculate->home = prefix; in calculate_home_prefix()
761 calculate->home = prefix; in calculate_home_prefix()
764 calculate->home = NULL; in calculate_home_prefix()
768 wcscpy_s(prefix, MAXPATHLEN+1, calculate->home); in calculate_home_prefix()
780 int skiphome = calculate->home==NULL ? 0 : 1; in calculate_module_search_path()
783 calculate->machine_path = getpythonregpath(HKEY_LOCAL_MACHINE, in calculate_module_search_path()
785 calculate->user_path = getpythonregpath(HKEY_CURRENT_USER, skiphome); in calculate_module_search_path()
790 int skipdefault = (calculate->pythonpath_env != NULL || in calculate_module_search_path()
791 calculate->home != NULL || in calculate_module_search_path()
792 calculate->machine_path != NULL || in calculate_module_search_path()
793 calculate->user_path != NULL); in calculate_module_search_path()
804 - If PYTHONHOME is set (in any way) item (3) is ignored. in calculate_module_search_path()
805 - If registry values are used, (4) and (5) are ignored. in calculate_module_search_path()
810 if (calculate->home != NULL) { in calculate_module_search_path()
818 bufsz *= wcslen(calculate->home); in calculate_module_search_path()
822 if (calculate->user_path) { in calculate_module_search_path()
823 bufsz += wcslen(calculate->user_path) + 1; in calculate_module_search_path()
825 if (calculate->machine_path) { in calculate_module_search_path()
826 bufsz += wcslen(calculate->machine_path) + 1; in calculate_module_search_path()
829 if (calculate->pythonpath_env != NULL) { in calculate_module_search_path()
830 bufsz += wcslen(calculate->pythonpath_env) + 1; in calculate_module_search_path()
840 if (calculate->pythonpath_env) { in calculate_module_search_path()
841 if (wcscpy_s(buf, bufsz - (buf - start_buf), in calculate_module_search_path()
842 calculate->pythonpath_env)) { in calculate_module_search_path()
849 if (wcscpy_s(buf, bufsz - (buf - start_buf), zip_path)) { in calculate_module_search_path()
855 if (calculate->user_path) { in calculate_module_search_path()
856 if (wcscpy_s(buf, bufsz - (buf - start_buf), calculate->user_path)) { in calculate_module_search_path()
862 if (calculate->machine_path) { in calculate_module_search_path()
863 if (wcscpy_s(buf, bufsz - (buf - start_buf), calculate->machine_path)) { in calculate_module_search_path()
869 if (calculate->home == NULL) { in calculate_module_search_path()
871 if (wcscpy_s(buf, bufsz - (buf - start_buf), PYTHONPATH)) { in calculate_module_search_path()
887 n = q-p; in calculate_module_search_path()
890 if (wcscpy_s(buf, bufsz - (buf - start_buf), calculate->home)) { in calculate_module_search_path()
895 n--; in calculate_module_search_path()
911 *(buf - 1) = L'\0'; in calculate_module_search_path()
923 const wchar_t *look = buf - 1; /* 'buf' is at the end of the buffer */ in calculate_module_search_path()
928 start of the path in question - even if this in calculate_module_search_path()
932 look--; in calculate_module_search_path()
933 nchars = lookEnd-look; in calculate_module_search_path()
941 /* If we are out of paths to search - give up */ in calculate_module_search_path()
945 look--; in calculate_module_search_path()
949 pathconfig->module_search_path = start_buf; in calculate_module_search_path()
968 wcscpy_s(argv0_path, MAXPATHLEN+1, pathconfig->program_full_path); in calculate_path()
996 if (change_ext(zip_path, pathconfig->program_full_path, L".zip")) { in calculate_path()
1003 if (pathconfig->module_search_path == NULL) { in calculate_path()
1012 if (pathconfig->prefix == NULL) { in calculate_path()
1013 pathconfig->prefix = _PyMem_RawWcsdup(prefix); in calculate_path()
1014 if (pathconfig->prefix == NULL) { in calculate_path()
1018 if (pathconfig->exec_prefix == NULL) { in calculate_path()
1019 pathconfig->exec_prefix = _PyMem_RawWcsdup(prefix); in calculate_path()
1020 if (pathconfig->exec_prefix == NULL) { in calculate_path()
1033 calculate->home = pathconfig->home; in calculate_init()
1034 calculate->path_env = _wgetenv(L"PATH"); in calculate_init()
1036 calculate->pythonpath_env = config->pythonpath_env; in calculate_init()
1045 PyMem_RawFree(calculate->machine_path); in calculate_free()
1046 PyMem_RawFree(calculate->user_path); in calculate_free()
1054 - PyConfig.pythonpath_env: PYTHONPATH environment variable
1055 - _PyPathConfig.home: Py_SetPythonHome() or PYTHONHOME environment variable
1056 - PATH environment variable
1057 - __PYVENV_LAUNCHER__ environment variable
1058 - GetModuleFileNameW(NULL): fully qualified path of the executable file of
1060 - ._pth configuration file
1061 - pyvenv.cfg configuration file
1062 - Registry key "Software\Python\PythonCore\X.Y\PythonPath"
1068 - base_executable
1069 - program_full_path
1070 - module_search_path
1071 - prefix
1072 - exec_prefix
1073 - isolated
1074 - site_import
1132 /* For back-compat, also search {sys.prefix}\DLLs, though in _Py_CheckPython3()