mirror of
https://github.com/RubyMetric/chsrc
synced 2026-03-04 12:50:45 +08:00
Add Rye config via rawstr4c
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
* File Authors : Aoran Zeng <ccmywish@qq.com>
|
||||
* Contributors : Nul None <nul@none.org>
|
||||
* Created On : <2024-12-06>
|
||||
* Last Modified : <2025-07-21>
|
||||
* Last Modified : <2025-07-22>
|
||||
*
|
||||
* 由于Rye已经有后继uv了,所以我们不把该管理器纳入Python group中
|
||||
* ------------------------------------------------------------*/
|
||||
@@ -38,22 +38,17 @@ pl_python_rye_getsrc (char *option)
|
||||
void
|
||||
pl_python_rye_setsrc (char *option)
|
||||
{
|
||||
/* 并不在 Python group 中,所以不考虑 target group 情况 */
|
||||
/* 并不在 Python group 中,所以不考虑 target group 情况,仅使用 Python group 提供的源 */
|
||||
chsrc_yield_source_and_confirm (pl_python_group);
|
||||
|
||||
const char *file =
|
||||
R"(
|
||||
[[sources]]
|
||||
name = "@1@"
|
||||
url = "@2@"
|
||||
)";
|
||||
const char *content = RAWSTR_pl_python_rye_config;
|
||||
|
||||
file = xy_str_gsub (file, "@1@", source.mirror->abbr);
|
||||
file = xy_str_gsub (file, "@2@", source.url);
|
||||
content = xy_str_gsub (content, "@1@", source.mirror->abbr);
|
||||
content = xy_str_gsub (content, "@2@", source.url);
|
||||
|
||||
char *rye_config = pl_python_find_rye_config ();
|
||||
chsrc_note2 (xy_strjoin (3, "请在配置文件 ", rye_config, " 中添加:"));
|
||||
println (file);
|
||||
print (content);
|
||||
|
||||
chsrc_determine_chgtype (ChgType_Manual);
|
||||
chsrc_conclude (&source);
|
||||
|
||||
Reference in New Issue
Block a user