xt-cli 0.2.1__tar.gz → 0.2.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {xt_cli-0.2.1/src/xt_cli.egg-info → xt_cli-0.2.2}/PKG-INFO +1 -1
- {xt_cli-0.2.1 → xt_cli-0.2.2}/pyproject.toml +32 -35
- xt_cli-0.2.2/src/xt_cli/__init__.py +11 -0
- {xt_cli-0.2.1/src → xt_cli-0.2.2/src/xt_cli}/__main__.py +1 -1
- {xt_cli-0.2.1/src → xt_cli-0.2.2/src/xt_cli}/cli.py +8 -8
- {xt_cli-0.2.1/src → xt_cli-0.2.2/src/xt_cli}/commands/build_cmd.py +9 -9
- {xt_cli-0.2.1/src → xt_cli-0.2.2/src/xt_cli}/commands/clean_cmd.py +6 -6
- {xt_cli-0.2.1/src → xt_cli-0.2.2/src/xt_cli}/commands/config_cmd.py +7 -7
- {xt_cli-0.2.1/src → xt_cli-0.2.2/src/xt_cli}/commands/deps_cmd.py +6 -6
- {xt_cli-0.2.1/src → xt_cli-0.2.2/src/xt_cli}/commands/fullclean_cmd.py +5 -5
- {xt_cli-0.2.1/src → xt_cli-0.2.2/src/xt_cli}/config.py +3 -3
- {xt_cli-0.2.1/src → xt_cli-0.2.2/src/xt_cli}/context.py +5 -5
- {xt_cli-0.2.1/src → xt_cli-0.2.2/src/xt_cli}/dependencies.py +2 -2
- {xt_cli-0.2.1/src → xt_cli-0.2.2/src/xt_cli}/hooks.py +4 -4
- {xt_cli-0.2.1/src → xt_cli-0.2.2/src/xt_cli}/models.py +1 -1
- {xt_cli-0.2.1/src → xt_cli-0.2.2/src/xt_cli}/paths.py +1 -1
- {xt_cli-0.2.1/src → xt_cli-0.2.2/src/xt_cli}/project.py +1 -1
- {xt_cli-0.2.1/src → xt_cli-0.2.2/src/xt_cli}/xmake.py +1 -1
- {xt_cli-0.2.1 → xt_cli-0.2.2/xt_cli.egg-info}/PKG-INFO +1 -1
- xt_cli-0.2.2/xt_cli.egg-info/SOURCES.txt +29 -0
- xt_cli-0.2.2/xt_cli.egg-info/entry_points.txt +2 -0
- xt_cli-0.2.2/xt_cli.egg-info/top_level.txt +1 -0
- xt_cli-0.2.1/src/__init__.py +0 -5
- xt_cli-0.2.1/src/xt_cli.egg-info/SOURCES.txt +0 -30
- xt_cli-0.2.1/src/xt_cli.egg-info/entry_points.txt +0 -2
- xt_cli-0.2.1/src/xt_cli.egg-info/top_level.txt +0 -16
- xt_cli-0.2.1/src/xt_cli.py +0 -10
- {xt_cli-0.2.1 → xt_cli-0.2.2}/LICENSE +0 -0
- {xt_cli-0.2.1 → xt_cli-0.2.2}/MANIFEST.in +0 -0
- {xt_cli-0.2.1 → xt_cli-0.2.2}/README.md +0 -0
- {xt_cli-0.2.1 → xt_cli-0.2.2}/setup.cfg +0 -0
- {xt_cli-0.2.1/src → xt_cli-0.2.2/src/xt_cli}/constants.py +0 -0
- {xt_cli-0.2.1/src → xt_cli-0.2.2/src/xt_cli}/errors.py +0 -0
- {xt_cli-0.2.1/src → xt_cli-0.2.2/src/xt_cli}/output.py +0 -0
- {xt_cli-0.2.1/src → xt_cli-0.2.2}/xt_cli.egg-info/dependency_links.txt +0 -0
- {xt_cli-0.2.1/src → xt_cli-0.2.2}/xt_cli.egg-info/requires.txt +0 -0
|
@@ -1,35 +1,32 @@
|
|
|
1
|
-
[build-system]
|
|
2
|
-
requires = ["setuptools>=68"]
|
|
3
|
-
build-backend = "setuptools.build_meta"
|
|
4
|
-
|
|
5
|
-
[project]
|
|
6
|
-
name = "xt-cli"
|
|
7
|
-
version = "0.2.
|
|
8
|
-
description = "xt sdk command line tool"
|
|
9
|
-
readme = "README.md"
|
|
10
|
-
license = "Apache-2.0"
|
|
11
|
-
requires-python = ">=3.10"
|
|
12
|
-
dependencies = [
|
|
13
|
-
"json5>=0.10,<1",
|
|
14
|
-
]
|
|
15
|
-
authors = [
|
|
16
|
-
{ name = "xt-sdk" }
|
|
17
|
-
]
|
|
18
|
-
classifiers = [
|
|
19
|
-
"Programming Language :: Python :: 3.12",
|
|
20
|
-
]
|
|
21
|
-
|
|
22
|
-
[project.scripts]
|
|
23
|
-
xt = "cli:main"
|
|
24
|
-
|
|
25
|
-
[tool.setuptools]
|
|
26
|
-
package-dir = {"" = "src"}
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
[tool.
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
markers = [
|
|
34
|
-
"integration: 依赖真实 xmake 与工具链环境的集成测试",
|
|
35
|
-
]
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=68"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "xt-cli"
|
|
7
|
+
version = "0.2.2"
|
|
8
|
+
description = "xt sdk command line tool"
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
license = "Apache-2.0"
|
|
11
|
+
requires-python = ">=3.10"
|
|
12
|
+
dependencies = [
|
|
13
|
+
"json5>=0.10,<1",
|
|
14
|
+
]
|
|
15
|
+
authors = [
|
|
16
|
+
{ name = "xt-sdk" }
|
|
17
|
+
]
|
|
18
|
+
classifiers = [
|
|
19
|
+
"Programming Language :: Python :: 3.12",
|
|
20
|
+
]
|
|
21
|
+
|
|
22
|
+
[project.scripts]
|
|
23
|
+
xt = "xt_cli.cli:main"
|
|
24
|
+
|
|
25
|
+
[tool.setuptools]
|
|
26
|
+
package-dir = {"xt_cli" = "src/xt_cli"}
|
|
27
|
+
packages = ["xt_cli", "xt_cli.commands"]
|
|
28
|
+
|
|
29
|
+
[tool.pytest.ini_options]
|
|
30
|
+
markers = [
|
|
31
|
+
"integration: 依赖真实 xmake 与工具链环境的集成测试",
|
|
32
|
+
]
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"""xt-cli package."""
|
|
2
|
+
|
|
3
|
+
__all__ = ["__version__", "BuildContext", "run_lifecycle_hook", "print_step",
|
|
4
|
+
"build_command", "build_clean_command", "build_run_command", "run_xmake"]
|
|
5
|
+
|
|
6
|
+
__version__ = "0.2.2"
|
|
7
|
+
|
|
8
|
+
from .models import BuildContext
|
|
9
|
+
from .hooks import run_lifecycle_hook
|
|
10
|
+
from .output import print_step
|
|
11
|
+
from .xmake import build_command, build_clean_command, build_run_command, run_xmake
|
|
@@ -5,8 +5,8 @@ import sys
|
|
|
5
5
|
from collections.abc import Callable
|
|
6
6
|
from typing import Sequence
|
|
7
7
|
|
|
8
|
-
from
|
|
9
|
-
from errors import XtCliError
|
|
8
|
+
from . import __version__
|
|
9
|
+
from .errors import XtCliError
|
|
10
10
|
|
|
11
11
|
_TASK_REGISTRY: dict[str, tuple[Callable[..., int], bool, Callable[[argparse.ArgumentParser], None] | None, str | None, str, int]] = {}
|
|
12
12
|
_SCOPE_PARSERS: dict[str, Callable[[argparse.ArgumentParser], None]] = {}
|
|
@@ -174,8 +174,8 @@ def _sort_tasks(segments: list[tuple[str, list[str]]]) -> list[tuple[str, list[s
|
|
|
174
174
|
|
|
175
175
|
def _discover_hook_tasks(parsed_args: argparse.Namespace) -> None:
|
|
176
176
|
"""扫描 hook 文件,自动注册自定义 task。"""
|
|
177
|
-
from context import build_context_from_options
|
|
178
|
-
from hooks import discover_hook_tasks
|
|
177
|
+
from .context import build_context_from_options
|
|
178
|
+
from .hooks import discover_hook_tasks
|
|
179
179
|
|
|
180
180
|
try:
|
|
181
181
|
context = build_context_from_options(
|
|
@@ -200,10 +200,10 @@ def _discover_hook_tasks(parsed_args: argparse.Namespace) -> None:
|
|
|
200
200
|
|
|
201
201
|
def _register_hook_task(task_name: str, source: str = "project", add_parser: Callable[[argparse.ArgumentParser], None] | None = None, help_desc: str | None = None) -> None:
|
|
202
202
|
"""将 hook 中的 handle_<task> 封装为标准 handler 并注册。"""
|
|
203
|
-
from constants import PRIORITY_DEFAULT
|
|
203
|
+
from .constants import PRIORITY_DEFAULT
|
|
204
204
|
|
|
205
205
|
def hook_handler(context, global_args: argparse.Namespace, shared_args: argparse.Namespace, self_args: argparse.Namespace, unknown_args: list[str]) -> int:
|
|
206
|
-
from hooks import dispatch_hook
|
|
206
|
+
from .hooks import dispatch_hook
|
|
207
207
|
|
|
208
208
|
result = dispatch_hook(context, task_name, unknown_args,
|
|
209
209
|
global_args=global_args,
|
|
@@ -223,7 +223,7 @@ def _execute_tasks(
|
|
|
223
223
|
segments: list[tuple[str, list[str]]],
|
|
224
224
|
) -> int:
|
|
225
225
|
"""按顺序执行 task 段,每段用 subparser 解析。"""
|
|
226
|
-
from context import build_context_from_options
|
|
226
|
+
from .context import build_context_from_options
|
|
227
227
|
|
|
228
228
|
# 先逐段解析(--help 在此阶段触发 SystemExit,避免不必要的 context 构建)
|
|
229
229
|
# 使用 bare parser(不含全局 option),确保 self_args 仅含 task 专属值
|
|
@@ -339,4 +339,4 @@ def main(argv: Sequence[str] | None = None) -> int:
|
|
|
339
339
|
return 1
|
|
340
340
|
|
|
341
341
|
# 导入命令模块触发 register_task 注册
|
|
342
|
-
from commands import build_cmd, clean_cmd, config_cmd, deps_cmd, fullclean_cmd # noqa: F401, E402
|
|
342
|
+
from .commands import build_cmd, clean_cmd, config_cmd, deps_cmd, fullclean_cmd # noqa: F401, E402
|
|
@@ -2,11 +2,11 @@ from __future__ import annotations
|
|
|
2
2
|
|
|
3
3
|
import argparse
|
|
4
4
|
|
|
5
|
-
from cli import register_task
|
|
6
|
-
from hooks import dispatch_hook
|
|
7
|
-
from models import BuildContext
|
|
8
|
-
from output import print_step
|
|
9
|
-
from xmake import build_command, run_xmake
|
|
5
|
+
from ..cli import register_task
|
|
6
|
+
from ..hooks import dispatch_hook
|
|
7
|
+
from ..models import BuildContext
|
|
8
|
+
from ..output import print_step
|
|
9
|
+
from ..xmake import build_command, run_xmake
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
def handle_build_command(context: BuildContext, global_args: argparse.Namespace, shared_args: argparse.Namespace, self_args: argparse.Namespace, unknown_args: list[str]) -> int:
|
|
@@ -14,12 +14,12 @@ def handle_build_command(context: BuildContext, global_args: argparse.Namespace,
|
|
|
14
14
|
# --sync-deps: 在依赖检查之前 checkout 仓库
|
|
15
15
|
sync_deps = getattr(global_args, "sync_deps", False)
|
|
16
16
|
if sync_deps:
|
|
17
|
-
from dependencies import sync_dependencies
|
|
17
|
+
from ..dependencies import sync_dependencies
|
|
18
18
|
dirty_allowed = getattr(global_args, "dirty", False)
|
|
19
19
|
sync_dependencies(context, dirty_allowed=dirty_allowed)
|
|
20
20
|
|
|
21
21
|
# 在 dispatch_hook 之前检查依赖版本(防止 hook 绕过)
|
|
22
|
-
from dependencies import check_dependencies, _print_warnings_box
|
|
22
|
+
from ..dependencies import check_dependencies, _print_warnings_box
|
|
23
23
|
dirty_allowed = getattr(global_args, "dirty", False)
|
|
24
24
|
strict = getattr(global_args, "strict", False)
|
|
25
25
|
passed, warnings = check_dependencies(context, dirty_allowed=dirty_allowed, strict=strict)
|
|
@@ -30,7 +30,7 @@ def handle_build_command(context: BuildContext, global_args: argparse.Namespace,
|
|
|
30
30
|
if hook_result.handled:
|
|
31
31
|
return hook_result.returncode
|
|
32
32
|
|
|
33
|
-
from hooks import run_lifecycle_hook
|
|
33
|
+
from ..hooks import run_lifecycle_hook
|
|
34
34
|
|
|
35
35
|
before_ret = run_lifecycle_hook(context, "before_build", unknown_args, global_args, shared_args, self_args)
|
|
36
36
|
if before_ret != 0:
|
|
@@ -45,7 +45,7 @@ def handle_build_command(context: BuildContext, global_args: argparse.Namespace,
|
|
|
45
45
|
|
|
46
46
|
# 在 after_build hook 之后更新版本追踪(反映最终仓库状态)
|
|
47
47
|
if result.returncode == 0:
|
|
48
|
-
from dependencies import update_dependencies, _is_track_enabled
|
|
48
|
+
from ..dependencies import update_dependencies, _is_track_enabled
|
|
49
49
|
no_track = getattr(global_args, "no_track", False)
|
|
50
50
|
if not no_track and _is_track_enabled(context):
|
|
51
51
|
update_dependencies(context)
|
|
@@ -2,11 +2,11 @@ from __future__ import annotations
|
|
|
2
2
|
|
|
3
3
|
import argparse
|
|
4
4
|
|
|
5
|
-
from cli import register_task
|
|
6
|
-
from hooks import dispatch_hook
|
|
7
|
-
from models import BuildContext
|
|
8
|
-
from output import print_step
|
|
9
|
-
from xmake import build_clean_command, run_xmake
|
|
5
|
+
from ..cli import register_task
|
|
6
|
+
from ..hooks import dispatch_hook
|
|
7
|
+
from ..models import BuildContext
|
|
8
|
+
from ..output import print_step
|
|
9
|
+
from ..xmake import build_clean_command, run_xmake
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
def handle_clean_command(context: BuildContext, global_args: argparse.Namespace, shared_args: argparse.Namespace, self_args: argparse.Namespace, unknown_args: list[str]) -> int:
|
|
@@ -15,7 +15,7 @@ def handle_clean_command(context: BuildContext, global_args: argparse.Namespace,
|
|
|
15
15
|
if hook_result.handled:
|
|
16
16
|
return hook_result.returncode
|
|
17
17
|
|
|
18
|
-
from hooks import run_lifecycle_hook
|
|
18
|
+
from ..hooks import run_lifecycle_hook
|
|
19
19
|
|
|
20
20
|
before_ret = run_lifecycle_hook(context, "before_clean", unknown_args, global_args, shared_args, self_args)
|
|
21
21
|
if before_ret != 0:
|
|
@@ -3,12 +3,12 @@ from __future__ import annotations
|
|
|
3
3
|
import argparse
|
|
4
4
|
from pathlib import Path
|
|
5
5
|
|
|
6
|
-
from cli import register_task
|
|
7
|
-
from config import get_config_value, reset_config_key, set_config_value
|
|
8
|
-
from config import _resolve_config_store
|
|
9
|
-
from constants import PRIORITY_INDEPENDENT
|
|
10
|
-
from errors import CliUsageError
|
|
11
|
-
from models import BuildContext
|
|
6
|
+
from ..cli import register_task
|
|
7
|
+
from ..config import get_config_value, reset_config_key, set_config_value
|
|
8
|
+
from ..config import _resolve_config_store
|
|
9
|
+
from ..constants import PRIORITY_INDEPENDENT
|
|
10
|
+
from ..errors import CliUsageError
|
|
11
|
+
from ..models import BuildContext
|
|
12
12
|
|
|
13
13
|
|
|
14
14
|
def add_args_config(parser: argparse.ArgumentParser) -> None:
|
|
@@ -108,7 +108,7 @@ def _resolve_set_action(parsed_global: argparse.Namespace, parsed_task) -> tuple
|
|
|
108
108
|
|
|
109
109
|
def _show_all_config(cwd: Path) -> None:
|
|
110
110
|
"""展示所有配置(分区:local / global / defaults)。"""
|
|
111
|
-
from config import _LOCAL_CONFIG_FILENAME
|
|
111
|
+
from ..config import _LOCAL_CONFIG_FILENAME
|
|
112
112
|
|
|
113
113
|
local_store = _resolve_config_store(use_local=True, cwd=cwd, home=None)
|
|
114
114
|
global_store = _resolve_config_store(use_local=False, cwd=cwd, home=None)
|
|
@@ -3,10 +3,10 @@ from __future__ import annotations
|
|
|
3
3
|
|
|
4
4
|
import argparse
|
|
5
5
|
|
|
6
|
-
from cli import register_task
|
|
7
|
-
from constants import PRIORITY_INDEPENDENT
|
|
8
|
-
from models import BuildContext
|
|
9
|
-
from dependencies import (
|
|
6
|
+
from ..cli import register_task
|
|
7
|
+
from ..constants import PRIORITY_INDEPENDENT
|
|
8
|
+
from ..models import BuildContext
|
|
9
|
+
from ..dependencies import (
|
|
10
10
|
_get_entry_version, _load_jsonc, _print_error, _print_info,
|
|
11
11
|
_resolve_repo_path, _save_jsonc, hash_dir,
|
|
12
12
|
)
|
|
@@ -36,7 +36,7 @@ def handle_deps_command(
|
|
|
36
36
|
) -> int:
|
|
37
37
|
if self_args.update_deps_require is not None:
|
|
38
38
|
if context is None:
|
|
39
|
-
from context import build_context_from_options
|
|
39
|
+
from ..context import build_context_from_options
|
|
40
40
|
context = build_context_from_options(
|
|
41
41
|
cwd=global_args.project,
|
|
42
42
|
project_dir=global_args.project,
|
|
@@ -116,7 +116,7 @@ def _resolve_entry_and_path(name: str, xt_deps: dict, context):
|
|
|
116
116
|
if isinstance(components, dict):
|
|
117
117
|
entry = components.get(name)
|
|
118
118
|
if isinstance(entry, dict):
|
|
119
|
-
from dependencies import _resolve_component_path
|
|
119
|
+
from ..dependencies import _resolve_component_path
|
|
120
120
|
repo_path = _resolve_component_path(name, entry, context)
|
|
121
121
|
return entry, repo_path
|
|
122
122
|
|
|
@@ -3,10 +3,10 @@ from __future__ import annotations
|
|
|
3
3
|
import argparse
|
|
4
4
|
import shutil
|
|
5
5
|
|
|
6
|
-
from cli import register_task
|
|
7
|
-
from hooks import dispatch_hook
|
|
8
|
-
from models import BuildContext
|
|
9
|
-
from output import print_step
|
|
6
|
+
from ..cli import register_task
|
|
7
|
+
from ..hooks import dispatch_hook
|
|
8
|
+
from ..models import BuildContext
|
|
9
|
+
from ..output import print_step
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
def handle_fullclean_command(context: BuildContext, global_args: argparse.Namespace, shared_args: argparse.Namespace, self_args: argparse.Namespace, unknown_args: list[str]) -> int:
|
|
@@ -15,7 +15,7 @@ def handle_fullclean_command(context: BuildContext, global_args: argparse.Namesp
|
|
|
15
15
|
if hook_result.handled:
|
|
16
16
|
return hook_result.returncode
|
|
17
17
|
|
|
18
|
-
from hooks import run_lifecycle_hook
|
|
18
|
+
from ..hooks import run_lifecycle_hook
|
|
19
19
|
|
|
20
20
|
before_ret = run_lifecycle_hook(context, "before_fullclean", unknown_args, global_args, shared_args, self_args)
|
|
21
21
|
if before_ret != 0:
|
|
@@ -6,9 +6,9 @@ from typing import Any
|
|
|
6
6
|
|
|
7
7
|
import json5
|
|
8
8
|
|
|
9
|
-
from constants import CONFIG_VERSION, DEFAULT_TARGET
|
|
10
|
-
from errors import ConfigError
|
|
11
|
-
from paths import build_global_config_path, normalize_path
|
|
9
|
+
from .constants import CONFIG_VERSION, DEFAULT_TARGET
|
|
10
|
+
from .errors import ConfigError
|
|
11
|
+
from .paths import build_global_config_path, normalize_path
|
|
12
12
|
|
|
13
13
|
_LOCAL_CONFIG_FILENAME = "xt_conf.jsonc"
|
|
14
14
|
_TOOLCHAINS_KEY = "toolchains"
|
|
@@ -4,11 +4,11 @@ import os
|
|
|
4
4
|
from pathlib import Path
|
|
5
5
|
from typing import Any
|
|
6
6
|
|
|
7
|
-
from config import ConfigStore
|
|
8
|
-
from errors import ConfigError, ProjectError
|
|
9
|
-
from models import BuildContext, ConfigSource, ResolvedValue
|
|
10
|
-
from paths import build_global_config_path, normalize_path, resolve_platform_name, resolve_target_path
|
|
11
|
-
from project import has_xmake_project, has_xt_main_target
|
|
7
|
+
from .config import ConfigStore
|
|
8
|
+
from .errors import ConfigError, ProjectError
|
|
9
|
+
from .models import BuildContext, ConfigSource, ResolvedValue
|
|
10
|
+
from .paths import build_global_config_path, normalize_path, resolve_platform_name, resolve_target_path
|
|
11
|
+
from .project import has_xmake_project, has_xt_main_target
|
|
12
12
|
|
|
13
13
|
_DEFAULT_TARGET = "windows/simulator"
|
|
14
14
|
_LOCAL_CONFIG_FILENAME = "xt_conf.jsonc"
|
|
@@ -13,8 +13,8 @@ from typing import Any
|
|
|
13
13
|
|
|
14
14
|
import json5
|
|
15
15
|
|
|
16
|
-
from config import ConfigStore
|
|
17
|
-
from paths import build_global_config_path
|
|
16
|
+
from .config import ConfigStore
|
|
17
|
+
from .paths import build_global_config_path
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
def _get_git_version(repo_path: Path) -> tuple[str, bool]:
|
|
@@ -7,8 +7,8 @@ from collections.abc import Callable
|
|
|
7
7
|
from dataclasses import dataclass
|
|
8
8
|
from pathlib import Path
|
|
9
9
|
|
|
10
|
-
from models import BuildContext
|
|
11
|
-
from output import print_step
|
|
10
|
+
from .models import BuildContext
|
|
11
|
+
from .output import print_step
|
|
12
12
|
|
|
13
13
|
_BUILTIN_TASKS = {"build", "clean", "fullclean"}
|
|
14
14
|
|
|
@@ -150,7 +150,7 @@ def _run_builtin_task(
|
|
|
150
150
|
self_args = argparse.Namespace()
|
|
151
151
|
|
|
152
152
|
if task == "build":
|
|
153
|
-
from xmake import build_command, run_xmake
|
|
153
|
+
from .xmake import build_command, run_xmake
|
|
154
154
|
|
|
155
155
|
before_ret = run_lifecycle_hook(context, "before_build", unknown_args, global_args, shared_args, self_args)
|
|
156
156
|
if before_ret != 0:
|
|
@@ -163,7 +163,7 @@ def _run_builtin_task(
|
|
|
163
163
|
run_lifecycle_hook(context, "after_build", unknown_args, global_args, shared_args, self_args)
|
|
164
164
|
return build_ret
|
|
165
165
|
elif task == "clean":
|
|
166
|
-
from xmake import build_clean_command, run_xmake
|
|
166
|
+
from .xmake import build_clean_command, run_xmake
|
|
167
167
|
|
|
168
168
|
before_ret = run_lifecycle_hook(context, "before_clean", unknown_args, global_args, self_args)
|
|
169
169
|
if before_ret != 0:
|
|
@@ -62,7 +62,7 @@ class BuildContext:
|
|
|
62
62
|
自动从当前 handler 的 dispatch 上下文读取 global_args/shared_args 等,
|
|
63
63
|
调用方无需显式传入。同 task 递归时跳过 hook,直接执行内置行为。
|
|
64
64
|
"""
|
|
65
|
-
from hooks import _BUILTIN_TASKS, _run_builtin_task, dispatch_hook
|
|
65
|
+
from .hooks import _BUILTIN_TASKS, _run_builtin_task, dispatch_hook
|
|
66
66
|
|
|
67
67
|
dispatch = getattr(self, "_dispatch_args", None)
|
|
68
68
|
if global_args is None and dispatch is not None:
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
LICENSE
|
|
2
|
+
MANIFEST.in
|
|
3
|
+
README.md
|
|
4
|
+
pyproject.toml
|
|
5
|
+
src/xt_cli/__init__.py
|
|
6
|
+
src/xt_cli/__main__.py
|
|
7
|
+
src/xt_cli/cli.py
|
|
8
|
+
src/xt_cli/config.py
|
|
9
|
+
src/xt_cli/constants.py
|
|
10
|
+
src/xt_cli/context.py
|
|
11
|
+
src/xt_cli/dependencies.py
|
|
12
|
+
src/xt_cli/errors.py
|
|
13
|
+
src/xt_cli/hooks.py
|
|
14
|
+
src/xt_cli/models.py
|
|
15
|
+
src/xt_cli/output.py
|
|
16
|
+
src/xt_cli/paths.py
|
|
17
|
+
src/xt_cli/project.py
|
|
18
|
+
src/xt_cli/xmake.py
|
|
19
|
+
src/xt_cli/commands/build_cmd.py
|
|
20
|
+
src/xt_cli/commands/clean_cmd.py
|
|
21
|
+
src/xt_cli/commands/config_cmd.py
|
|
22
|
+
src/xt_cli/commands/deps_cmd.py
|
|
23
|
+
src/xt_cli/commands/fullclean_cmd.py
|
|
24
|
+
xt_cli.egg-info/PKG-INFO
|
|
25
|
+
xt_cli.egg-info/SOURCES.txt
|
|
26
|
+
xt_cli.egg-info/dependency_links.txt
|
|
27
|
+
xt_cli.egg-info/entry_points.txt
|
|
28
|
+
xt_cli.egg-info/requires.txt
|
|
29
|
+
xt_cli.egg-info/top_level.txt
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
xt_cli
|
xt_cli-0.2.1/src/__init__.py
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
LICENSE
|
|
2
|
-
MANIFEST.in
|
|
3
|
-
README.md
|
|
4
|
-
pyproject.toml
|
|
5
|
-
src/__init__.py
|
|
6
|
-
src/__main__.py
|
|
7
|
-
src/cli.py
|
|
8
|
-
src/config.py
|
|
9
|
-
src/constants.py
|
|
10
|
-
src/context.py
|
|
11
|
-
src/dependencies.py
|
|
12
|
-
src/errors.py
|
|
13
|
-
src/hooks.py
|
|
14
|
-
src/models.py
|
|
15
|
-
src/output.py
|
|
16
|
-
src/paths.py
|
|
17
|
-
src/project.py
|
|
18
|
-
src/xmake.py
|
|
19
|
-
src/xt_cli.py
|
|
20
|
-
src/commands/build_cmd.py
|
|
21
|
-
src/commands/clean_cmd.py
|
|
22
|
-
src/commands/config_cmd.py
|
|
23
|
-
src/commands/deps_cmd.py
|
|
24
|
-
src/commands/fullclean_cmd.py
|
|
25
|
-
src/xt_cli.egg-info/PKG-INFO
|
|
26
|
-
src/xt_cli.egg-info/SOURCES.txt
|
|
27
|
-
src/xt_cli.egg-info/dependency_links.txt
|
|
28
|
-
src/xt_cli.egg-info/entry_points.txt
|
|
29
|
-
src/xt_cli.egg-info/requires.txt
|
|
30
|
-
src/xt_cli.egg-info/top_level.txt
|
xt_cli-0.2.1/src/xt_cli.py
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
"""xt-cli 公共 API 模块。
|
|
2
|
-
|
|
3
|
-
面向 xt_hook.py 作者,提供稳定接口。
|
|
4
|
-
xt-cli 内部重构不影响此模块导出。
|
|
5
|
-
"""
|
|
6
|
-
|
|
7
|
-
from models import BuildContext
|
|
8
|
-
from hooks import run_lifecycle_hook
|
|
9
|
-
from output import print_step
|
|
10
|
-
from xmake import build_command, build_clean_command, build_run_command, run_xmake
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|