Lines Matching full:path
8 # This script helps installing tools required to use the ESP-IDF, and updating PATH
15 # (%USERPROFILE%/.espressif on Windows). This path can be modified by setting
28 # the PATH to point to the installed tools and set up other environment variables
82 IDF_TOOLS_PATH_DEFAULT = os.path.join('~', '.espressif')
213 …# Note: it would seem logical to add extra_paths to env[PATH], instead, and let OS do the job of f…
220 for path in extra_paths:
222 fullpath = os.path.join(path, cmd[0] + ext)
223 if os.path.exists(fullpath):
249 paths_list = [p.replace('/', os.path.sep) if os.path.sep in p else p for p in paths_list]
262 to the PATH environment variable.
265 new_path = os.pathsep.join(extra_paths) + os.pathsep + env_arg['PATH']
267 env_arg['PATH'] = new_path.encode('utf8') # type: ignore
269 env_arg['PATH'] = new_path
290 def mkdir_p(path): # type: (str) -> None argument
292 os.makedirs(path)
294 if exc.errno != errno.EEXIST or not os.path.isdir(path):
326 url_type, path = splittype(url)
335 # Just return the local path and the "headers" for file://
338 return os.path.normpath(path), headers
392 def strip_container_dirs(path, levels): # type: (str, int) -> None argument
395 tmp_path = path + '.tmp'
396 if os.path.exists(tmp_path):
398 rename_with_retry(path, tmp_path)
399 os.mkdir(path)
406 base_path = os.path.join(base_path, contents[0])
407 if not os.path.isdir(base_path):
412 move_from = os.path.join(base_path, name)
413 move_to = os.path.join(path, name)
542 return os.path.join(global_idf_tools_path, 'tools', self.name) # type: ignore
546 return os.path.join(self.get_path(), version)
550 … return [os.path.join(tool_path, *p) for p in self._current_options.export_paths] # type: ignore
556 - ${TOOL_PATH} => the actual path where the version is installed
569 Execute the tool, optionally prepending extra_paths to PATH,
582 # tool is not on the path
629 Checks whether the tool can be found in PATH and in global_idf_tools_path.
634 # First check if the tool is in system PATH
638 # not in PATH
641 warn('tool {} found in path, but {}'.format(
652 if not os.path.exists(tool_path):
678 archive_name = os.path.basename(url)
679 local_path = os.path.join(global_idf_tools_path, 'dist', archive_name) # type: ignore
680 mkdir_p(os.path.dirname(local_path))
682 if os.path.isfile(local_path):
714 …if not os.path.isfile(local_temp_path) or not self.check_download_file(download_obj, local_temp_pa…
730 archive_name = os.path.basename(download_obj.url)
731 archive_path = os.path.join(global_idf_tools_path, 'dist', archive_name) # type: ignore
732 assert (os.path.isfile(archive_path))
734 if os.path.exists(dest_dir):
735 warn('destination path already exists, removing')
822 for path in export_paths: # type: ignore
823 tool_obj.options.export_paths.append(path) # type: ignore
983 version_file_path = os.path.join(global_idf_path, 'version.txt') # type: ignore
984 if os.path.exists(version_file_path):
1004 …with open(os.path.join(global_idf_path, 'components', 'esp_common', 'include', 'esp_idf_version.h'…
1018 idf_python_env_path = os.path.join(global_idf_tools_path, 'python_env', # type: ignore
1028 idf_python_export_path = os.path.join(idf_python_env_path, subdir)
1029 virtualenv_python = os.path.join(idf_python_export_path, python_exe)
1036 idf_env_file_path = os.path.join(global_idf_tools_path, IDF_ENV_FILE) # type: ignore
1040 if not os.path.exists(idf_env_file_path):
1043 filename, ending = os.path.splitext(os.path.basename(idf_env_file_path))
1045 …os.rename(idf_env_file_path, os.path.join(os.path.dirname(idf_env_file_path), (filename + '_failed…
1064 with open(os.path.join(global_idf_tools_path, IDF_ENV_FILE), 'w') as w: # type: ignore
1067 …warn('File {} can not be created. '.format(os.path.join(global_idf_tools_path, IDF_ENV_FILE))) # …
1091 … with open(os.path.join(global_idf_tools_path, IDF_ENV_FILE), 'r') as idf_env_file: # type: ignore
1094 …# warn('File {} was not found. Installing tools for all esp targets.'.format(os.path.join(global_i…
1160 info(' version found in PATH: %s' % tool.version_in_path)
1163 info(' no version found in PATH')
1190 warn('using an unsupported version of tool {} found in PATH: {}'.format(
1194 # unsupported version in path
1197 # supported/deprecated version in PATH, use it
1200 … info('Using a supported version of tool {} found in PATH: {}.'.format(name, tool.version_in_path),
1205 … warn('using a deprecated version of tool {} found in PATH: {}'.format(name, tool.version_in_path))
1228 …info('An unsupported version of tool {} was found in PATH: {}. '.format(name, tool.version_in_path…
1233 # use whatever is available in PATH
1237 info('Not using an unsupported version of tool {} found in PATH: {}.'.format(
1250 current_path = os.getenv('PATH')
1252 if os.path.exists(virtualenv_python):
1259 idf_tools_dir = os.path.join(global_idf_path, 'tools')
1265 old_path = '%PATH%'
1268 old_path = '$PATH'
1287 export_vars['PATH'] = path_sep.join(to_shell_specific_paths(paths_to_export) + [old_path])
1483 if not os.path.exists(wheels_dir):
1493 if is_virtualenv and (not os.path.exists(idf_python_env_path) or reinstall):
1497 if os.path.exists(virtualenv_python):
1512 if reinstall and os.path.exists(idf_python_env_path):
1516 if not os.path.exists(virtualenv_python):
1562 requirements_txt = os.path.join(global_idf_path, 'requirements.txt')
1596 file_name = os.path.basename(file_path)
1616 args.output = os.path.join(global_idf_path, TOOLS_FILE_NEW)
1627 args.output = os.path.join(global_idf_path, TOOLS_FILE_NEW)
1641 with open(os.path.join(global_idf_path, TOOLS_FILE), 'r') as tools_file:
1644 with open(os.path.join(global_idf_path, TOOLS_SCHEMA_FILE), 'r') as schema_file:
1736 parser.add_argument('--tools-json', help='Path to the tools.json file to use')
1737 parser.add_argument('--idf-path', help='ESP-IDF path to use')
1741 subparsers.add_parser('check', help='Print summary of tools installed or found in PATH')
1746 … export.add_argument('--prefer-system', help='Normally, if the tool is already present in PATH, ' +
1748 … 'will be used instead. If this flag is given, the version in PATH ' +
1822 global_idf_path = os.path.realpath(os.path.join(os.path.dirname(__file__), '..'))
1826 …global_idf_tools_path = os.environ.get('IDF_TOOLS_PATH') or os.path.expanduser(IDF_TOOLS_PATH_DEFA…
1850 global_tools_json = os.path.join(global_idf_path, TOOLS_FILE)