• Home
  • Raw
  • Download

Lines Matching refs:calculate

451 search_for_prefix(PyCalculatePath *calculate, _PyPathConfig *pathconfig,  in search_for_prefix()  argument
466 status = joinpath(prefix, calculate->lib_python, prefix_len); in search_for_prefix()
477 wchar_t *path = joinpath2(calculate->argv0_path, BUILD_LANDMARK); in search_for_prefix()
491 if (safe_wcscpy(prefix, calculate->argv0_path, prefix_len) < 0) { in search_for_prefix()
495 status = joinpath(prefix, calculate->vpath_macro, prefix_len); in search_for_prefix()
518 status = copy_absolute(prefix, calculate->argv0_path, prefix_len); in search_for_prefix()
526 status = joinpath(prefix, calculate->lib_python, prefix_len); in search_for_prefix()
546 if (safe_wcscpy(prefix, calculate->prefix_macro, prefix_len) < 0) { in search_for_prefix()
549 status = joinpath(prefix, calculate->lib_python, prefix_len); in search_for_prefix()
571 calculate_prefix(PyCalculatePath *calculate, _PyPathConfig *pathconfig) in calculate_prefix() argument
578 status = search_for_prefix(calculate, pathconfig, in calculate_prefix()
580 &calculate->prefix_found); in calculate_prefix()
585 if (!calculate->prefix_found) { in calculate_prefix()
586 if (calculate->warnings) { in calculate_prefix()
591 calculate->prefix = joinpath2(calculate->prefix_macro, in calculate_prefix()
592 calculate->lib_python); in calculate_prefix()
595 calculate->prefix = _PyMem_RawWcsdup(prefix); in calculate_prefix()
598 if (calculate->prefix == NULL) { in calculate_prefix()
606 calculate_set_prefix(PyCalculatePath *calculate, _PyPathConfig *pathconfig) in calculate_set_prefix() argument
613 if (calculate->prefix_found > 0) { in calculate_set_prefix()
614 wchar_t *prefix = _PyMem_RawWcsdup(calculate->prefix); in calculate_set_prefix()
636 pathconfig->prefix = _PyMem_RawWcsdup(calculate->prefix_macro); in calculate_set_prefix()
700 search_for_exec_prefix(PyCalculatePath *calculate, _PyPathConfig *pathconfig, in search_for_exec_prefix() argument
720 status = joinpath(exec_prefix, calculate->lib_python, exec_prefix_len); in search_for_exec_prefix()
734 status = calculate_pybuilddir(calculate->argv0_path, in search_for_exec_prefix()
744 status = copy_absolute(exec_prefix, calculate->argv0_path, exec_prefix_len); in search_for_exec_prefix()
752 status = joinpath(exec_prefix, calculate->lib_python, exec_prefix_len); in search_for_exec_prefix()
771 if (safe_wcscpy(exec_prefix, calculate->exec_prefix_macro, exec_prefix_len) < 0) { in search_for_exec_prefix()
774 status = joinpath(exec_prefix, calculate->lib_python, exec_prefix_len); in search_for_exec_prefix()
794 calculate_exec_prefix(PyCalculatePath *calculate, _PyPathConfig *pathconfig) in calculate_exec_prefix() argument
801 status = search_for_exec_prefix(calculate, pathconfig, in calculate_exec_prefix()
803 &calculate->exec_prefix_found); in calculate_exec_prefix()
808 if (!calculate->exec_prefix_found) { in calculate_exec_prefix()
809 if (calculate->warnings) { in calculate_exec_prefix()
815 wchar_t *lib_dynload = joinpath2(calculate->platlibdir, in calculate_exec_prefix()
821 calculate->exec_prefix = joinpath2(calculate->exec_prefix_macro, in calculate_exec_prefix()
825 if (calculate->exec_prefix == NULL) { in calculate_exec_prefix()
831 calculate->exec_prefix = _PyMem_RawWcsdup(exec_prefix); in calculate_exec_prefix()
832 if (calculate->exec_prefix == NULL) { in calculate_exec_prefix()
841 calculate_set_exec_prefix(PyCalculatePath *calculate, in calculate_set_exec_prefix() argument
844 if (calculate->exec_prefix_found > 0) { in calculate_set_exec_prefix()
845 wchar_t *exec_prefix = _PyMem_RawWcsdup(calculate->exec_prefix); in calculate_set_exec_prefix()
870 pathconfig->exec_prefix = _PyMem_RawWcsdup(calculate->exec_prefix_macro); in calculate_set_exec_prefix()
957 calculate_program_impl(PyCalculatePath *calculate, _PyPathConfig *pathconfig) in calculate_program_impl() argument
988 if (calculate->path_env) { in calculate_program_impl()
990 status = calculate_which(calculate->path_env, pathconfig->program_name, in calculate_program_impl()
1012 calculate_program(PyCalculatePath *calculate, _PyPathConfig *pathconfig) in calculate_program() argument
1016 status = calculate_program_impl(calculate, pathconfig); in calculate_program()
1096 calculate_argv0_path_framework(PyCalculatePath *calculate, _PyPathConfig *pathconfig) in calculate_argv0_path_framework() argument
1136 wchar_t *lib_python = joinpath2(parent, calculate->lib_python); in calculate_argv0_path_framework()
1154 PyMem_RawFree(calculate->argv0_path); in calculate_argv0_path_framework()
1155 calculate->argv0_path = _PyMem_RawWcsdup(pathconfig->program_full_path); in calculate_argv0_path_framework()
1156 if (calculate->argv0_path == NULL) { in calculate_argv0_path_framework()
1166 PyMem_RawFree(calculate->argv0_path); in calculate_argv0_path_framework()
1167 calculate->argv0_path = wbuf; in calculate_argv0_path_framework()
1178 calculate_argv0_path(PyCalculatePath *calculate, in calculate_argv0_path() argument
1183 calculate->argv0_path = _PyMem_RawWcsdup(pathconfig->program_full_path); in calculate_argv0_path()
1184 if (calculate->argv0_path == NULL) { in calculate_argv0_path()
1189 status = calculate_argv0_path_framework(calculate, pathconfig); in calculate_argv0_path()
1195 status = resolve_symlinks(&calculate->argv0_path); in calculate_argv0_path()
1200 reduce(calculate->argv0_path); in calculate_argv0_path()
1207 calculate_open_pyenv(PyCalculatePath *calculate, FILE **env_file_p) in calculate_open_pyenv() argument
1214 wchar_t *filename = joinpath2(calculate->argv0_path, env_cfg); in calculate_open_pyenv()
1231 wchar_t *parent = _PyMem_RawWcsdup(calculate->argv0_path); in calculate_open_pyenv()
1260 calculate_read_pyenv(PyCalculatePath *calculate) in calculate_read_pyenv() argument
1265 status = calculate_open_pyenv(calculate, &env_file); in calculate_read_pyenv()
1283 PyMem_RawFree(calculate->argv0_path); in calculate_read_pyenv()
1284 calculate->argv0_path = home; in calculate_read_pyenv()
1292 calculate_zip_path(PyCalculatePath *calculate) in calculate_zip_path() argument
1297 wchar_t *path = joinpath2(calculate->platlibdir, in calculate_zip_path()
1304 if (calculate->prefix_found > 0) { in calculate_zip_path()
1308 wchar_t *parent = _PyMem_RawWcsdup(calculate->prefix); in calculate_zip_path()
1315 calculate->zip_path = joinpath2(parent, path); in calculate_zip_path()
1319 calculate->zip_path = joinpath2(calculate->prefix_macro, path); in calculate_zip_path()
1322 if (calculate->zip_path == NULL) { in calculate_zip_path()
1328 size_t len = wcslen(calculate->zip_path); in calculate_zip_path()
1329 calculate->zip_path[len - 6] = VERSION[0]; in calculate_zip_path()
1330 calculate->zip_path[len - 5] = VERSION[2]; in calculate_zip_path()
1341 calculate_module_search_path(PyCalculatePath *calculate, in calculate_module_search_path() argument
1346 if (calculate->pythonpath_env != NULL) { in calculate_module_search_path()
1347 bufsz += wcslen(calculate->pythonpath_env) + 1; in calculate_module_search_path()
1350 wchar_t *defpath = calculate->pythonpath_macro; in calculate_module_search_path()
1351 size_t prefixsz = wcslen(calculate->prefix) + 1; in calculate_module_search_path()
1370 bufsz += wcslen(calculate->zip_path) + 1; in calculate_module_search_path()
1371 bufsz += wcslen(calculate->exec_prefix) + 1; in calculate_module_search_path()
1381 if (calculate->pythonpath_env) { in calculate_module_search_path()
1382 wcscpy(buf, calculate->pythonpath_env); in calculate_module_search_path()
1387 wcscat(buf, calculate->zip_path); in calculate_module_search_path()
1393 defpath = calculate->pythonpath_macro; in calculate_module_search_path()
1398 wcscat(buf, calculate->prefix); in calculate_module_search_path()
1399 if (prefixsz >= 2 && calculate->prefix[prefixsz - 2] != SEP && in calculate_module_search_path()
1422 wcscat(buf, calculate->exec_prefix); in calculate_module_search_path()
1430 calculate_init(PyCalculatePath *calculate, const PyConfig *config) in calculate_init() argument
1434 calculate->warnings = config->pathconfig_warnings; in calculate_init()
1435 calculate->pythonpath_env = config->pythonpath_env; in calculate_init()
1436 calculate->platlibdir = config->platlibdir; in calculate_init()
1440 calculate->path_env = Py_DecodeLocale(path, &len); in calculate_init()
1441 if (!calculate->path_env) { in calculate_init()
1447 calculate->pythonpath_macro = Py_DecodeLocale(PYTHONPATH, &len); in calculate_init()
1448 if (!calculate->pythonpath_macro) { in calculate_init()
1451 calculate->prefix_macro = Py_DecodeLocale(PREFIX, &len); in calculate_init()
1452 if (!calculate->prefix_macro) { in calculate_init()
1455 calculate->exec_prefix_macro = Py_DecodeLocale(EXEC_PREFIX, &len); in calculate_init()
1456 if (!calculate->exec_prefix_macro) { in calculate_init()
1459 calculate->vpath_macro = Py_DecodeLocale(VPATH, &len); in calculate_init()
1460 if (!calculate->vpath_macro) { in calculate_init()
1469 calculate->lib_python = joinpath2(config->platlibdir, pyversion); in calculate_init()
1471 if (calculate->lib_python == NULL) { in calculate_init()
1480 calculate_free(PyCalculatePath *calculate) in calculate_free() argument
1482 PyMem_RawFree(calculate->pythonpath_macro); in calculate_free()
1483 PyMem_RawFree(calculate->prefix_macro); in calculate_free()
1484 PyMem_RawFree(calculate->exec_prefix_macro); in calculate_free()
1485 PyMem_RawFree(calculate->vpath_macro); in calculate_free()
1486 PyMem_RawFree(calculate->lib_python); in calculate_free()
1487 PyMem_RawFree(calculate->path_env); in calculate_free()
1488 PyMem_RawFree(calculate->zip_path); in calculate_free()
1489 PyMem_RawFree(calculate->argv0_path); in calculate_free()
1490 PyMem_RawFree(calculate->prefix); in calculate_free()
1491 PyMem_RawFree(calculate->exec_prefix); in calculate_free()
1496 calculate_path(PyCalculatePath *calculate, _PyPathConfig *pathconfig) in calculate_path() argument
1501 status = calculate_program(calculate, pathconfig); in calculate_path()
1507 status = calculate_argv0_path(calculate, pathconfig); in calculate_path()
1514 status = calculate_read_pyenv(calculate); in calculate_path()
1519 status = calculate_prefix(calculate, pathconfig); in calculate_path()
1524 status = calculate_zip_path(calculate); in calculate_path()
1529 status = calculate_exec_prefix(calculate, pathconfig); in calculate_path()
1534 if ((!calculate->prefix_found || !calculate->exec_prefix_found) in calculate_path()
1535 && calculate->warnings) in calculate_path()
1542 status = calculate_module_search_path(calculate, pathconfig); in calculate_path()
1549 status = calculate_set_prefix(calculate, pathconfig); in calculate_path()
1556 status = calculate_set_exec_prefix(calculate, pathconfig); in calculate_path()
1599 PyCalculatePath calculate; in _PyPathConfig_Calculate() local
1600 memset(&calculate, 0, sizeof(calculate)); in _PyPathConfig_Calculate()
1602 status = calculate_init(&calculate, config); in _PyPathConfig_Calculate()
1607 status = calculate_path(&calculate, pathconfig); in _PyPathConfig_Calculate()
1619 calculate_free(&calculate); in _PyPathConfig_Calculate()