新增环境信息参数并整合打包元数据 (Add env info flag and consolidate packaging metadata) - #295
Open
dongly wants to merge 1 commit into
Open
新增环境信息参数并整合打包元数据 (Add env info flag and consolidate packaging metadata)#295dongly wants to merge 1 commit into
dongly wants to merge 1 commit into
Conversation
新增环境信息参数并整合打包元数据 EN: Show the environment banner via a new --info flag; pin the argparse prog to rt-env; show a welcome message on env activation in env.sh/env.ps1; extract load_env_json() with a description getter in version.py; move packaging metadata to pyproject.toml as distribution rt-env with dynamic version/description sourced from env.json via the slimmed setup.py. CN: 新增 --info 参数显示环境信息横幅;argparse 程序名固定为 rt-env;env.sh/env.ps1 激活时显示欢迎信息;version.py 提取 load_env_json() 公共加载函数并新增 description 读取;打包元数据迁移至 pyproject.toml(分发名 rt-env,version/description 由精简后的 setup.py 从 env.json 动态读取)。
Member
|
可否给一个实际输出情况? |
Contributor
Author
|
已更新实际输出 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概述
本 PR 拆分自 #271
本 PR 为 env 工具新增
--info参数显示环境信息横幅,激活脚本增加欢迎信息,并将打包元数据整合至
pyproject.toml(分发名rt-env),版本号与描述统一由env.json单源提供。变更明细
--info参数:输出环境信息横幅(ENV_ROOT / PKGS_ROOT / RTT_ROOT / BSP_ROOT / RT-Thread 版本);argparse 程序名固定为rt-env,usage 不再显示 venv 启动器全路径env.sh/env.ps1激活成功后显示欢迎信息(rt-env --info,命令存在才显示);env.sh使用 POSIX 兼容重定向version.py:提取公共load_env_json()(三级定位:脚本目录 →ENV_ROOT→~/.env)、新增get_rt_env_description()、统一兜底默认值pyproject.toml:分发名rt-env、6 个控制台入口(含webui)、完整包映射(含env.plugins.*);setup.py精简为动态 version/description 提供者;依赖新增pyyaml.gitignore忽略本地 OMO 状态目录输出
行为对比
rt-env -vrt-env --infopip install分发名envrt-env(import 包名env.*不变)兼容性
-v/--version输出与 master 逐字节一致;子命令集不变env.*不变,仅分发名变更验证
-v、--info、--info <子命令>短路、-h、无效子命令、无参数帮助bash -n与bash --posix -n语法检查通过version.py兜底矩阵:env.json 缺失 / 损坏 / 单字段缺失importlib.metadata以rt-env解析 2.0.2、6 个控制台入口全部生成、包与数据文件完整
rt-env --info横幅实际生效)