diff --git a/src/recipe/lang/Python/Rye.c b/src/recipe/lang/Python/Rye.c index f794303..925a0d9 100644 --- a/src/recipe/lang/Python/Rye.c +++ b/src/recipe/lang/Python/Rye.c @@ -4,7 +4,7 @@ * File Authors : Aoran Zeng * Contributors : Nul None * 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); diff --git a/src/recipe/lang/Python/rawstr4c.h b/src/recipe/lang/Python/rawstr4c.h index 0ccccc8..114c199 100644 --- a/src/recipe/lang/Python/rawstr4c.h +++ b/src/recipe/lang/Python/rawstr4c.h @@ -1,9 +1,7 @@ #pragma once /** - * Generated by rawstr4c v0.2.1.0-2025/07/16 - * - * Date: 2025-07-16T23:55:50.053226+08:00 + * Generated by rawstr4c v0.2.3-2025/07/22 */ char RAWSTR_pl_python_uv_config_source_content[] = "\x5b\x5b\x69\x6e\x64\x65\x78\x5d\x5d\x0a\x75\x72\x6c\x20\x3d\x20\x22\x40\x75\x72\x6c\x22\x0a\x64\x65\x66\x61\x75\x6c\x74\x20\x3d\x20\x74\x72\x75\x65\x0a\x0a"; @@ -14,3 +12,5 @@ char RAWSTR_pl_python_set_uv_config[] = "\x40\x73\x65\x64\x40\x20\x27\x2f\x5e\x5 char RAWSTR_pl_python_final_uv_cmd[] = "\x67\x72\x65\x70\x20\x2d\x71\x20\x27\x5e\x5b\x5b\x69\x6e\x64\x65\x78\x5d\x5d\x24\x27\x20\x40\x66\x40\x20\x26\x26\x20\x40\x75\x63\x6d\x64\x40\x20\x7c\x7c\x20\x40\x61\x63\x6d\x64\x40\x0a"; +char RAWSTR_pl_python_rye_config[] = "\x5b\x5b\x73\x6f\x75\x72\x63\x65\x73\x5d\x5d\x0a\x6e\x61\x6d\x65\x20\x3d\x20\x22\x40\x31\x40\x22\x0a\x75\x72\x6c\x20\x20\x3d\x20\x22\x40\x32\x40\x22\x0a"; + diff --git a/src/recipe/lang/Python/rawstr4c.md b/src/recipe/lang/Python/rawstr4c.md index 608dc52..d2ffd24 100644 --- a/src/recipe/lang/Python/rawstr4c.md +++ b/src/recipe/lang/Python/rawstr4c.md @@ -6,7 +6,7 @@ ! | happy game ! Contributors : Nil Null ! Created On : <2025-07-14> - ! Last Modified : <2025-07-14> + ! Last Modified : <2025-07-22> ! ---------------------------------------------------------- --> # rawstr4c input for Python @@ -16,8 +16,12 @@ - translate = `:hex` - keep-postfix = `false` +
+ +## uv + ### uv config source content ```toml @@ -42,9 +46,22 @@ grep -A 2 'index' @f@ | sed -n 's/^url = "\(.*\)"/\1/p' ``` - ### Final uv cmd ```sh grep -q '^[[index]]$' @f@ && @ucmd@ || @acmd@ ``` + +
+ + + +## Rye + +- name = `rye_config` + +```toml +[[sources]] +name = "@1@" +url = "@2@" +```