mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-09 20:41:14 +00:00
style: format python files with isort and double-quote-string-fixer
This commit is contained in:
@@ -5,11 +5,11 @@ import subprocess
|
||||
import sys
|
||||
|
||||
import click
|
||||
|
||||
from idf_py_actions.constants import GENERATORS, SUPPORTED_TARGETS, PREVIEW_TARGETS
|
||||
from idf_py_actions.constants import GENERATORS, PREVIEW_TARGETS, SUPPORTED_TARGETS
|
||||
from idf_py_actions.errors import FatalError
|
||||
from idf_py_actions.global_options import global_options
|
||||
from idf_py_actions.tools import ensure_build_directory, idf_version, merge_action_lists, realpath, run_target, TargetChoice
|
||||
from idf_py_actions.tools import (TargetChoice, ensure_build_directory, idf_version, merge_action_lists, realpath,
|
||||
run_target)
|
||||
|
||||
|
||||
def action_extensions(base_actions, project_path):
|
||||
@@ -46,7 +46,7 @@ def action_extensions(base_actions, project_path):
|
||||
ensure_build_directory(args, ctx.info_name)
|
||||
|
||||
try:
|
||||
subprocess.check_output(GENERATORS[args.generator]["dry_run"] + [target_name], cwd=args.build_dir)
|
||||
subprocess.check_output(GENERATORS[args.generator]['dry_run'] + [target_name], cwd=args.build_dir)
|
||||
|
||||
except Exception:
|
||||
raise FatalError(
|
||||
@@ -67,21 +67,21 @@ def action_extensions(base_actions, project_path):
|
||||
if not os.path.isdir(args.build_dir):
|
||||
print("Build directory '%s' not found. Nothing to clean." % args.build_dir)
|
||||
return
|
||||
build_target("clean", ctx, args)
|
||||
build_target('clean', ctx, args)
|
||||
|
||||
def _delete_windows_symlinks(directory):
|
||||
"""
|
||||
It deletes symlinks recursively on Windows. It is useful for Python 2 which doesn't detect symlinks on Windows.
|
||||
"""
|
||||
deleted_paths = []
|
||||
if os.name == "nt":
|
||||
if os.name == 'nt':
|
||||
import ctypes
|
||||
|
||||
for root, dirnames, _filenames in os.walk(directory):
|
||||
for d in dirnames:
|
||||
full_path = os.path.join(root, d)
|
||||
try:
|
||||
full_path = full_path.decode("utf-8")
|
||||
full_path = full_path.decode('utf-8')
|
||||
except Exception:
|
||||
pass
|
||||
if ctypes.windll.kernel32.GetFileAttributesW(full_path) & 0x0400:
|
||||
@@ -98,11 +98,11 @@ def action_extensions(base_actions, project_path):
|
||||
print("Build directory '%s' is empty. Nothing to clean." % build_dir)
|
||||
return
|
||||
|
||||
if not os.path.exists(os.path.join(build_dir, "CMakeCache.txt")):
|
||||
if not os.path.exists(os.path.join(build_dir, 'CMakeCache.txt')):
|
||||
raise FatalError(
|
||||
"Directory '%s' doesn't seem to be a CMake build directory. Refusing to automatically "
|
||||
"delete files in this directory. Delete the directory manually to 'clean' it." % build_dir)
|
||||
red_flags = ["CMakeLists.txt", ".git", ".svn"]
|
||||
red_flags = ['CMakeLists.txt', '.git', '.svn']
|
||||
for red in red_flags:
|
||||
red = os.path.join(build_dir, red)
|
||||
if os.path.exists(red):
|
||||
@@ -115,43 +115,43 @@ def action_extensions(base_actions, project_path):
|
||||
# outside of this directory.
|
||||
deleted_symlinks = _delete_windows_symlinks(build_dir)
|
||||
if args.verbose and len(deleted_symlinks) > 1:
|
||||
print("The following symlinks were identified and removed:\n%s" % "\n".join(deleted_symlinks))
|
||||
print('The following symlinks were identified and removed:\n%s' % '\n'.join(deleted_symlinks))
|
||||
for f in os.listdir(build_dir): # TODO: once we are Python 3 only, this can be os.scandir()
|
||||
f = os.path.join(build_dir, f)
|
||||
if args.verbose:
|
||||
print("Removing: %s" % f)
|
||||
print('Removing: %s' % f)
|
||||
if os.path.isdir(f):
|
||||
shutil.rmtree(f)
|
||||
else:
|
||||
os.remove(f)
|
||||
|
||||
def python_clean(action, ctx, args):
|
||||
for root, dirnames, filenames in os.walk(os.environ["IDF_PATH"]):
|
||||
for root, dirnames, filenames in os.walk(os.environ['IDF_PATH']):
|
||||
for d in dirnames:
|
||||
if d == "__pycache__":
|
||||
if d == '__pycache__':
|
||||
dir_to_delete = os.path.join(root, d)
|
||||
if args.verbose:
|
||||
print("Removing: %s" % dir_to_delete)
|
||||
print('Removing: %s' % dir_to_delete)
|
||||
shutil.rmtree(dir_to_delete)
|
||||
for filename in fnmatch.filter(filenames, '*.py[co]'):
|
||||
file_to_delete = os.path.join(root, filename)
|
||||
if args.verbose:
|
||||
print("Removing: %s" % file_to_delete)
|
||||
print('Removing: %s' % file_to_delete)
|
||||
os.remove(file_to_delete)
|
||||
|
||||
def set_target(action, ctx, args, idf_target):
|
||||
if (not args["preview"] and idf_target in PREVIEW_TARGETS):
|
||||
if (not args['preview'] and idf_target in PREVIEW_TARGETS):
|
||||
raise FatalError(
|
||||
"%s is still in preview. You have to append '--preview' option after idf.py to use any preview feature."
|
||||
% idf_target)
|
||||
args.define_cache_entry.append("IDF_TARGET=" + idf_target)
|
||||
args.define_cache_entry.append('IDF_TARGET=' + idf_target)
|
||||
sdkconfig_path = os.path.join(args.project_dir, 'sdkconfig')
|
||||
sdkconfig_old = sdkconfig_path + ".old"
|
||||
sdkconfig_old = sdkconfig_path + '.old'
|
||||
if os.path.exists(sdkconfig_old):
|
||||
os.remove(sdkconfig_old)
|
||||
if os.path.exists(sdkconfig_path):
|
||||
os.rename(sdkconfig_path, sdkconfig_old)
|
||||
print("Set Target to: %s, new sdkconfig created. Existing sdkconfig renamed to sdkconfig.old." % idf_target)
|
||||
print('Set Target to: %s, new sdkconfig created. Existing sdkconfig renamed to sdkconfig.old.' % idf_target)
|
||||
ensure_build_directory(args, ctx.info_name, True)
|
||||
|
||||
def reconfigure(action, ctx, args):
|
||||
@@ -161,10 +161,10 @@ def action_extensions(base_actions, project_path):
|
||||
args.project_dir = realpath(args.project_dir)
|
||||
if args.build_dir is not None and args.project_dir == realpath(args.build_dir):
|
||||
raise FatalError(
|
||||
"Setting the build directory to the project directory is not supported. Suggest dropping "
|
||||
'Setting the build directory to the project directory is not supported. Suggest dropping '
|
||||
"--build-dir option, the default is a 'build' subdirectory inside the project directory.")
|
||||
if args.build_dir is None:
|
||||
args.build_dir = os.path.join(args.project_dir, "build")
|
||||
args.build_dir = os.path.join(args.project_dir, 'build')
|
||||
args.build_dir = realpath(args.build_dir)
|
||||
|
||||
def idf_version_callback(ctx, param, value):
|
||||
@@ -174,9 +174,9 @@ def action_extensions(base_actions, project_path):
|
||||
version = idf_version()
|
||||
|
||||
if not version:
|
||||
raise FatalError("ESP-IDF version cannot be determined")
|
||||
raise FatalError('ESP-IDF version cannot be determined')
|
||||
|
||||
print("ESP-IDF %s" % version)
|
||||
print('ESP-IDF %s' % version)
|
||||
sys.exit(0)
|
||||
|
||||
def list_targets_callback(ctx, param, value):
|
||||
@@ -186,272 +186,272 @@ def action_extensions(base_actions, project_path):
|
||||
for target in SUPPORTED_TARGETS:
|
||||
print(target)
|
||||
|
||||
if "preview" in ctx.params:
|
||||
if 'preview' in ctx.params:
|
||||
for target in PREVIEW_TARGETS:
|
||||
print(target)
|
||||
|
||||
sys.exit(0)
|
||||
|
||||
root_options = {
|
||||
"global_options": [
|
||||
'global_options': [
|
||||
{
|
||||
"names": ["--version"],
|
||||
"help": "Show IDF version and exit.",
|
||||
"is_flag": True,
|
||||
"expose_value": False,
|
||||
"callback": idf_version_callback,
|
||||
'names': ['--version'],
|
||||
'help': 'Show IDF version and exit.',
|
||||
'is_flag': True,
|
||||
'expose_value': False,
|
||||
'callback': idf_version_callback,
|
||||
},
|
||||
{
|
||||
"names": ["--list-targets"],
|
||||
"help": "Print list of supported targets and exit.",
|
||||
"is_flag": True,
|
||||
"expose_value": False,
|
||||
"callback": list_targets_callback,
|
||||
'names': ['--list-targets'],
|
||||
'help': 'Print list of supported targets and exit.',
|
||||
'is_flag': True,
|
||||
'expose_value': False,
|
||||
'callback': list_targets_callback,
|
||||
},
|
||||
{
|
||||
"names": ["-C", "--project-dir"],
|
||||
"scope": "shared",
|
||||
"help": "Project directory.",
|
||||
"type": click.Path(),
|
||||
"default": os.getcwd(),
|
||||
'names': ['-C', '--project-dir'],
|
||||
'scope': 'shared',
|
||||
'help': 'Project directory.',
|
||||
'type': click.Path(),
|
||||
'default': os.getcwd(),
|
||||
},
|
||||
{
|
||||
"names": ["-B", "--build-dir"],
|
||||
"help": "Build directory.",
|
||||
"type": click.Path(),
|
||||
"default": None,
|
||||
'names': ['-B', '--build-dir'],
|
||||
'help': 'Build directory.',
|
||||
'type': click.Path(),
|
||||
'default': None,
|
||||
},
|
||||
{
|
||||
"names": ["-w/-n", "--cmake-warn-uninitialized/--no-warnings"],
|
||||
"help": ("Enable CMake uninitialized variable warnings for CMake files inside the project directory. "
|
||||
'names': ['-w/-n', '--cmake-warn-uninitialized/--no-warnings'],
|
||||
'help': ('Enable CMake uninitialized variable warnings for CMake files inside the project directory. '
|
||||
"(--no-warnings is now the default, and doesn't need to be specified.)"),
|
||||
"envvar": "IDF_CMAKE_WARN_UNINITIALIZED",
|
||||
"is_flag": True,
|
||||
"default": False,
|
||||
'envvar': 'IDF_CMAKE_WARN_UNINITIALIZED',
|
||||
'is_flag': True,
|
||||
'default': False,
|
||||
},
|
||||
{
|
||||
"names": ["-v", "--verbose"],
|
||||
"help": "Verbose build output.",
|
||||
"is_flag": True,
|
||||
"is_eager": True,
|
||||
"default": False,
|
||||
"callback": verbose_callback,
|
||||
'names': ['-v', '--verbose'],
|
||||
'help': 'Verbose build output.',
|
||||
'is_flag': True,
|
||||
'is_eager': True,
|
||||
'default': False,
|
||||
'callback': verbose_callback,
|
||||
},
|
||||
{
|
||||
"names": ["--preview"],
|
||||
"help": "Enable IDF features that are still in preview.",
|
||||
"is_flag": True,
|
||||
"default": False,
|
||||
'names': ['--preview'],
|
||||
'help': 'Enable IDF features that are still in preview.',
|
||||
'is_flag': True,
|
||||
'default': False,
|
||||
},
|
||||
{
|
||||
"names": ["--ccache/--no-ccache"],
|
||||
"help": "Use ccache in build. Disabled by default.",
|
||||
"is_flag": True,
|
||||
"envvar": "IDF_CCACHE_ENABLE",
|
||||
"default": False,
|
||||
'names': ['--ccache/--no-ccache'],
|
||||
'help': 'Use ccache in build. Disabled by default.',
|
||||
'is_flag': True,
|
||||
'envvar': 'IDF_CCACHE_ENABLE',
|
||||
'default': False,
|
||||
},
|
||||
{
|
||||
"names": ["-G", "--generator"],
|
||||
"help": "CMake generator.",
|
||||
"type": click.Choice(GENERATORS.keys()),
|
||||
'names': ['-G', '--generator'],
|
||||
'help': 'CMake generator.',
|
||||
'type': click.Choice(GENERATORS.keys()),
|
||||
},
|
||||
{
|
||||
"names": ["--dry-run"],
|
||||
"help": "Only process arguments, but don't execute actions.",
|
||||
"is_flag": True,
|
||||
"hidden": True,
|
||||
"default": False,
|
||||
'names': ['--dry-run'],
|
||||
'help': "Only process arguments, but don't execute actions.",
|
||||
'is_flag': True,
|
||||
'hidden': True,
|
||||
'default': False,
|
||||
},
|
||||
],
|
||||
"global_action_callbacks": [validate_root_options],
|
||||
'global_action_callbacks': [validate_root_options],
|
||||
}
|
||||
|
||||
build_actions = {
|
||||
"actions": {
|
||||
"all": {
|
||||
"aliases": ["build"],
|
||||
"callback": build_target,
|
||||
"short_help": "Build the project.",
|
||||
"help": (
|
||||
"Build the project. This can involve multiple steps:\n\n"
|
||||
"1. Create the build directory if needed. "
|
||||
'actions': {
|
||||
'all': {
|
||||
'aliases': ['build'],
|
||||
'callback': build_target,
|
||||
'short_help': 'Build the project.',
|
||||
'help': (
|
||||
'Build the project. This can involve multiple steps:\n\n'
|
||||
'1. Create the build directory if needed. '
|
||||
"The sub-directory 'build' is used to hold build output, "
|
||||
"although this can be changed with the -B option.\n\n"
|
||||
"2. Run CMake as necessary to configure the project "
|
||||
"and generate build files for the main build tool.\n\n"
|
||||
"3. Run the main build tool (Ninja or GNU Make). "
|
||||
"By default, the build tool is automatically detected "
|
||||
"but it can be explicitly set by passing the -G option to idf.py.\n\n"),
|
||||
"options": global_options,
|
||||
"order_dependencies": [
|
||||
"reconfigure",
|
||||
"menuconfig",
|
||||
"clean",
|
||||
"fullclean",
|
||||
'although this can be changed with the -B option.\n\n'
|
||||
'2. Run CMake as necessary to configure the project '
|
||||
'and generate build files for the main build tool.\n\n'
|
||||
'3. Run the main build tool (Ninja or GNU Make). '
|
||||
'By default, the build tool is automatically detected '
|
||||
'but it can be explicitly set by passing the -G option to idf.py.\n\n'),
|
||||
'options': global_options,
|
||||
'order_dependencies': [
|
||||
'reconfigure',
|
||||
'menuconfig',
|
||||
'clean',
|
||||
'fullclean',
|
||||
],
|
||||
},
|
||||
"menuconfig": {
|
||||
"callback": menuconfig,
|
||||
"help": 'Run "menuconfig" project configuration tool.',
|
||||
"options": global_options + [
|
||||
'menuconfig': {
|
||||
'callback': menuconfig,
|
||||
'help': 'Run "menuconfig" project configuration tool.',
|
||||
'options': global_options + [
|
||||
{
|
||||
"names": ["--style", "--color-scheme", "style"],
|
||||
"help": (
|
||||
"Menuconfig style.\n"
|
||||
"The built-in styles include:\n\n"
|
||||
"- default - a yellowish theme,\n\n"
|
||||
"- monochrome - a black and white theme, or\n\n"
|
||||
"- aquatic - a blue theme.\n\n"
|
||||
"It is possible to customize these themes further"
|
||||
" as it is described in the Color schemes section of the kconfiglib documentation.\n"
|
||||
'names': ['--style', '--color-scheme', 'style'],
|
||||
'help': (
|
||||
'Menuconfig style.\n'
|
||||
'The built-in styles include:\n\n'
|
||||
'- default - a yellowish theme,\n\n'
|
||||
'- monochrome - a black and white theme, or\n\n'
|
||||
'- aquatic - a blue theme.\n\n'
|
||||
'It is possible to customize these themes further'
|
||||
' as it is described in the Color schemes section of the kconfiglib documentation.\n'
|
||||
'The default value is \"aquatic\".'),
|
||||
"envvar": "MENUCONFIG_STYLE",
|
||||
"default": "aquatic",
|
||||
'envvar': 'MENUCONFIG_STYLE',
|
||||
'default': 'aquatic',
|
||||
}
|
||||
],
|
||||
},
|
||||
"confserver": {
|
||||
"callback": build_target,
|
||||
"help": "Run JSON configuration server.",
|
||||
"options": global_options,
|
||||
'confserver': {
|
||||
'callback': build_target,
|
||||
'help': 'Run JSON configuration server.',
|
||||
'options': global_options,
|
||||
},
|
||||
"size": {
|
||||
"callback": build_target,
|
||||
"help": "Print basic size information about the app.",
|
||||
"options": global_options,
|
||||
"dependencies": ["app"],
|
||||
'size': {
|
||||
'callback': build_target,
|
||||
'help': 'Print basic size information about the app.',
|
||||
'options': global_options,
|
||||
'dependencies': ['app'],
|
||||
},
|
||||
"size-components": {
|
||||
"callback": build_target,
|
||||
"help": "Print per-component size information.",
|
||||
"options": global_options,
|
||||
"dependencies": ["app"],
|
||||
'size-components': {
|
||||
'callback': build_target,
|
||||
'help': 'Print per-component size information.',
|
||||
'options': global_options,
|
||||
'dependencies': ['app'],
|
||||
},
|
||||
"size-files": {
|
||||
"callback": build_target,
|
||||
"help": "Print per-source-file size information.",
|
||||
"options": global_options,
|
||||
"dependencies": ["app"],
|
||||
'size-files': {
|
||||
'callback': build_target,
|
||||
'help': 'Print per-source-file size information.',
|
||||
'options': global_options,
|
||||
'dependencies': ['app'],
|
||||
},
|
||||
"bootloader": {
|
||||
"callback": build_target,
|
||||
"help": "Build only bootloader.",
|
||||
"options": global_options,
|
||||
'bootloader': {
|
||||
'callback': build_target,
|
||||
'help': 'Build only bootloader.',
|
||||
'options': global_options,
|
||||
},
|
||||
"app": {
|
||||
"callback": build_target,
|
||||
"help": "Build only the app.",
|
||||
"order_dependencies": ["clean", "fullclean", "reconfigure"],
|
||||
"options": global_options,
|
||||
'app': {
|
||||
'callback': build_target,
|
||||
'help': 'Build only the app.',
|
||||
'order_dependencies': ['clean', 'fullclean', 'reconfigure'],
|
||||
'options': global_options,
|
||||
},
|
||||
"efuse_common_table": {
|
||||
"callback": build_target,
|
||||
"help": "Generate C-source for IDF's eFuse fields.",
|
||||
"order_dependencies": ["reconfigure"],
|
||||
"options": global_options,
|
||||
'efuse_common_table': {
|
||||
'callback': build_target,
|
||||
'help': "Generate C-source for IDF's eFuse fields.",
|
||||
'order_dependencies': ['reconfigure'],
|
||||
'options': global_options,
|
||||
},
|
||||
"efuse_custom_table": {
|
||||
"callback": build_target,
|
||||
"help": "Generate C-source for user's eFuse fields.",
|
||||
"order_dependencies": ["reconfigure"],
|
||||
"options": global_options,
|
||||
'efuse_custom_table': {
|
||||
'callback': build_target,
|
||||
'help': "Generate C-source for user's eFuse fields.",
|
||||
'order_dependencies': ['reconfigure'],
|
||||
'options': global_options,
|
||||
},
|
||||
"show_efuse_table": {
|
||||
"callback": build_target,
|
||||
"help": "Print eFuse table.",
|
||||
"order_dependencies": ["reconfigure"],
|
||||
"options": global_options,
|
||||
'show_efuse_table': {
|
||||
'callback': build_target,
|
||||
'help': 'Print eFuse table.',
|
||||
'order_dependencies': ['reconfigure'],
|
||||
'options': global_options,
|
||||
},
|
||||
"partition_table": {
|
||||
"callback": build_target,
|
||||
"help": "Build only partition table.",
|
||||
"order_dependencies": ["reconfigure"],
|
||||
"options": global_options,
|
||||
'partition_table': {
|
||||
'callback': build_target,
|
||||
'help': 'Build only partition table.',
|
||||
'order_dependencies': ['reconfigure'],
|
||||
'options': global_options,
|
||||
},
|
||||
"erase_otadata": {
|
||||
"callback": build_target,
|
||||
"help": "Erase otadata partition.",
|
||||
"options": global_options,
|
||||
'erase_otadata': {
|
||||
'callback': build_target,
|
||||
'help': 'Erase otadata partition.',
|
||||
'options': global_options,
|
||||
},
|
||||
"read_otadata": {
|
||||
"callback": build_target,
|
||||
"help": "Read otadata partition.",
|
||||
"options": global_options,
|
||||
'read_otadata': {
|
||||
'callback': build_target,
|
||||
'help': 'Read otadata partition.',
|
||||
'options': global_options,
|
||||
},
|
||||
"build-system-targets": {
|
||||
"callback": list_build_system_targets,
|
||||
"help": "Print list of build system targets.",
|
||||
'build-system-targets': {
|
||||
'callback': list_build_system_targets,
|
||||
'help': 'Print list of build system targets.',
|
||||
},
|
||||
"fallback": {
|
||||
"callback": fallback_target,
|
||||
"help": "Handle for targets not known for idf.py.",
|
||||
"hidden": True,
|
||||
'fallback': {
|
||||
'callback': fallback_target,
|
||||
'help': 'Handle for targets not known for idf.py.',
|
||||
'hidden': True,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
clean_actions = {
|
||||
"actions": {
|
||||
"reconfigure": {
|
||||
"callback": reconfigure,
|
||||
"short_help": "Re-run CMake.",
|
||||
"help": (
|
||||
'actions': {
|
||||
'reconfigure': {
|
||||
'callback': reconfigure,
|
||||
'short_help': 'Re-run CMake.',
|
||||
'help': (
|
||||
"Re-run CMake even if it doesn't seem to need re-running. "
|
||||
"This isn't necessary during normal usage, "
|
||||
"but can be useful after adding/removing files from the source tree, "
|
||||
"or when modifying CMake cache variables. "
|
||||
'but can be useful after adding/removing files from the source tree, '
|
||||
'or when modifying CMake cache variables. '
|
||||
"For example, \"idf.py -DNAME='VALUE' reconfigure\" "
|
||||
'can be used to set variable "NAME" in CMake cache to value "VALUE".'),
|
||||
"options": global_options,
|
||||
"order_dependencies": ["menuconfig", "fullclean"],
|
||||
'options': global_options,
|
||||
'order_dependencies': ['menuconfig', 'fullclean'],
|
||||
},
|
||||
"set-target": {
|
||||
"callback": set_target,
|
||||
"short_help": "Set the chip target to build.",
|
||||
"help": (
|
||||
"Set the chip target to build. This will remove the "
|
||||
"existing sdkconfig file and corresponding CMakeCache and "
|
||||
"create new ones according to the new target.\nFor example, "
|
||||
'set-target': {
|
||||
'callback': set_target,
|
||||
'short_help': 'Set the chip target to build.',
|
||||
'help': (
|
||||
'Set the chip target to build. This will remove the '
|
||||
'existing sdkconfig file and corresponding CMakeCache and '
|
||||
'create new ones according to the new target.\nFor example, '
|
||||
"\"idf.py set-target esp32\" will select esp32 as the new chip "
|
||||
"target."),
|
||||
"arguments": [
|
||||
'target.'),
|
||||
'arguments': [
|
||||
{
|
||||
"names": ["idf-target"],
|
||||
"nargs": 1,
|
||||
"type": TargetChoice(SUPPORTED_TARGETS + PREVIEW_TARGETS),
|
||||
'names': ['idf-target'],
|
||||
'nargs': 1,
|
||||
'type': TargetChoice(SUPPORTED_TARGETS + PREVIEW_TARGETS),
|
||||
},
|
||||
],
|
||||
"dependencies": ["fullclean"],
|
||||
'dependencies': ['fullclean'],
|
||||
},
|
||||
"clean": {
|
||||
"callback": clean,
|
||||
"short_help": "Delete build output files from the build directory.",
|
||||
"help": (
|
||||
"Delete build output files from the build directory, "
|
||||
'clean': {
|
||||
'callback': clean,
|
||||
'short_help': 'Delete build output files from the build directory.',
|
||||
'help': (
|
||||
'Delete build output files from the build directory, '
|
||||
"forcing a 'full rebuild' the next time "
|
||||
"the project is built. Cleaning doesn't delete "
|
||||
"CMake configuration output and some other files"),
|
||||
"order_dependencies": ["fullclean"],
|
||||
'CMake configuration output and some other files'),
|
||||
'order_dependencies': ['fullclean'],
|
||||
},
|
||||
"fullclean": {
|
||||
"callback": fullclean,
|
||||
"short_help": "Delete the entire build directory contents.",
|
||||
"help": (
|
||||
"Delete the entire build directory contents. "
|
||||
"This includes all CMake configuration output."
|
||||
"The next time the project is built, "
|
||||
"CMake will configure it from scratch. "
|
||||
"Note that this option recursively deletes all files "
|
||||
"in the build directory, so use with care."
|
||||
"Project configuration is not deleted.")
|
||||
'fullclean': {
|
||||
'callback': fullclean,
|
||||
'short_help': 'Delete the entire build directory contents.',
|
||||
'help': (
|
||||
'Delete the entire build directory contents. '
|
||||
'This includes all CMake configuration output.'
|
||||
'The next time the project is built, '
|
||||
'CMake will configure it from scratch. '
|
||||
'Note that this option recursively deletes all files '
|
||||
'in the build directory, so use with care.'
|
||||
'Project configuration is not deleted.')
|
||||
},
|
||||
"python-clean": {
|
||||
"callback": python_clean,
|
||||
"short_help": "Delete generated Python byte code from the IDF directory",
|
||||
"help": (
|
||||
"Delete generated Python byte code from the IDF directory "
|
||||
"which may cause issues when switching between IDF and Python versions. "
|
||||
"It is advised to run this target after switching versions.")
|
||||
'python-clean': {
|
||||
'callback': python_clean,
|
||||
'short_help': 'Delete generated Python byte code from the IDF directory',
|
||||
'help': (
|
||||
'Delete generated Python byte code from the IDF directory '
|
||||
'which may cause issues when switching between IDF and Python versions. '
|
||||
'It is advised to run this target after switching versions.')
|
||||
},
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user