mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-07 20:00:53 +00:00
style: format python files with isort and double-quote-string-fixer
This commit is contained in:
@@ -29,15 +29,15 @@ except Exception:
|
||||
|
||||
|
||||
def escape_backslash(path):
|
||||
if sys.platform == "win32":
|
||||
if sys.platform == 'win32':
|
||||
# escaped backslashes are necessary in order to be able to copy-paste the printed path
|
||||
return path.replace("\\", "\\\\")
|
||||
return path.replace('\\', '\\\\')
|
||||
else:
|
||||
return path
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
idf_path = os.getenv("IDF_PATH")
|
||||
if __name__ == '__main__':
|
||||
idf_path = os.getenv('IDF_PATH')
|
||||
|
||||
default_requirements_path = os.path.join(idf_path, 'requirements.txt')
|
||||
|
||||
@@ -72,30 +72,30 @@ if __name__ == "__main__":
|
||||
elif os.environ.get('IDF_PYTHON_ENV_PATH'):
|
||||
# We are running inside a private virtual environment under IDF_TOOLS_PATH,
|
||||
# ask the user to run install.bat again.
|
||||
if sys.platform == "win32" and not os.environ.get("MSYSTEM"):
|
||||
if sys.platform == 'win32' and not os.environ.get('MSYSTEM'):
|
||||
install_script = 'install.bat'
|
||||
else:
|
||||
install_script = 'install.sh'
|
||||
print('To install the missing packages, please run "%s"' % os.path.join(idf_path, install_script))
|
||||
elif sys.platform == "win32" and os.environ.get("MSYSTEM", None) == "MINGW32" and "/mingw32/bin/python" in sys.executable:
|
||||
elif sys.platform == 'win32' and os.environ.get('MSYSTEM', None) == 'MINGW32' and '/mingw32/bin/python' in sys.executable:
|
||||
print("The recommended way to install a packages is via \"pacman\". Please run \"pacman -Ss <package_name>\" for"
|
||||
" searching the package database and if found then "
|
||||
' searching the package database and if found then '
|
||||
"\"pacman -S mingw-w64-i686-python-<package_name>\" for installing it.")
|
||||
print("NOTE: You may need to run \"pacman -Syu\" if your package database is older and run twice if the "
|
||||
"previous run updated \"pacman\" itself.")
|
||||
print("Please read https://github.com/msys2/msys2/wiki/Using-packages for further information about using "
|
||||
print('Please read https://github.com/msys2/msys2/wiki/Using-packages for further information about using '
|
||||
"\"pacman\"")
|
||||
# Special case for MINGW32 Python, needs some packages
|
||||
# via MSYS2 not via pip or system breaks...
|
||||
for requirement in not_satisfied:
|
||||
if requirement.startswith('cryptography'):
|
||||
print("WARNING: The cryptography package have dependencies on system packages so please make sure "
|
||||
print('WARNING: The cryptography package have dependencies on system packages so please make sure '
|
||||
"you run \"pacman -Syu\" followed by \"pacman -S mingw-w64-i686-python{}-cryptography\"."
|
||||
"".format(sys.version_info[0],))
|
||||
''.format(sys.version_info[0],))
|
||||
continue
|
||||
elif requirement.startswith('setuptools'):
|
||||
print("Please run the following command to install MSYS2's MINGW Python setuptools package:")
|
||||
print("pacman -S mingw-w64-i686-python-setuptools")
|
||||
print('pacman -S mingw-w64-i686-python-setuptools')
|
||||
continue
|
||||
else:
|
||||
print('Please follow the instructions found in the "Set up the tools" section of '
|
||||
|
Reference in New Issue
Block a user