Lines Matching refs:os
38 import os
82 IDF_TOOLS_PATH_DEFAULT = os.path.join('~', '.espressif')
86 IDF_MAINTAINER = os.environ.get('IDF_MAINTAINER') or False
90 IDF_TOOLS_INSTALL_CMD = os.environ.get('IDF_TOOLS_INSTALL_CMD')
91 IDF_TOOLS_EXPORT_CMD = os.environ.get('IDF_TOOLS_INSTALL_CMD')
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]
251 if 'MSYSTEM' in os.environ:
264 env_arg = os.environ.copy()
265 new_path = os.pathsep.join(extra_paths) + os.pathsep + env_arg['PATH']
292 os.makedirs(path)
294 if exc.errno != errno.EEXIST or not os.path.isdir(path):
338 return os.path.normpath(path), headers
380 os.rename(path_from, path_to)
396 if os.path.exists(tmp_path):
399 os.mkdir(path)
403 contents = os.listdir(base_path)
406 base_path = os.path.join(base_path, contents[0])
407 if not os.path.isdir(base_path):
410 contents = os.listdir(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
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):
685 os.unlink(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):
983 version_file_path = os.path.join(global_idf_path, 'version.txt') # type: ignore
984 if os.path.exists(version_file_path):
991 cwd=global_idf_path, env=os.environ).decode()
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
1246 old_v = os.environ.get(k)
1250 current_path = os.getenv('PATH')
1252 if os.path.exists(virtualenv_python):
1254 if os.getenv('IDF_PYTHON_ENV_PATH') != idf_python_env_path:
1259 idf_tools_dir = os.path.join(global_idf_path, 'tools')
1264 if sys.platform == 'win32' and 'MSYSTEM' not in os.environ:
1274 if sys.platform == 'win32' and 'MSYSTEM' not in os.environ:
1308 mirror_prefix_map_env = os.getenv('IDF_MIRROR_PREFIX_MAP')
1335 github_assets = os.environ['IDF_GITHUB_ASSETS'].strip()
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):
1557 env_copy = os.environ.copy()
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:
1818 global_idf_path = os.environ.get('IDF_PATH')
1822 global_idf_path = os.path.realpath(os.path.join(os.path.dirname(__file__), '..'))
1823 os.environ['IDF_PATH'] = global_idf_path
1826 …global_idf_tools_path = os.environ.get('IDF_TOOLS_PATH') or os.path.expanduser(IDF_TOOLS_PATH_DEFA…
1831 os.environ.pop('__PYVENV_LAUNCHER__', None)
1850 global_tools_json = os.path.join(global_idf_path, TOOLS_FILE)