所有语言设置 scope 信息

This commit is contained in:
Aoran Zeng
2026-02-24 14:00:42 +08:00
parent 179d0b6d39
commit 197ebba13d
27 changed files with 149 additions and 36 deletions

View File

@@ -17,7 +17,11 @@ pl_python_pdm_prelude (void)
chef_set_cooks (this, 1, "@ccmywish");
chef_set_sauciers (this, 0);
chef_allow_local_mode (this, FullyCan, NULL, NULL);
chef_set_scope_cap (this, ProjectScope, ScopeCap_Able_And_Implemented);
chef_set_scope_cap (this, UserScope, ScopeCap_Able_And_Implemented);
chef_set_scope_cap (this, SystemScope, ScopeCap_Unable);
chef_set_default_scope (this, UserScope);
chef_allow_english(this);
chef_allow_user_define(this);

View File

@@ -17,7 +17,12 @@ pl_python_poetry_prelude (void)
chef_set_cooks (this, 1, "@ccmywish");
chef_set_sauciers (this, 0);
chef_allow_local_mode (this, FullyCan, "Poetry 默认使用项目级换源", "Poetry uses project-level source changing by default");
/* Poetry 仅支持项目级换源 */
chef_set_scope_cap (this, ProjectScope, ScopeCap_Able_And_Implemented);
chef_set_scope_cap (this, UserScope, ScopeCap_Unable);
chef_set_scope_cap (this, SystemScope, ScopeCap_Unable);
chef_set_default_scope (this, ProjectScope);
chef_allow_english(this);
chef_allow_user_define(this);
@@ -41,12 +46,7 @@ pl_python_poetry_setsrc (char *option)
if (chsrc_in_standalone_mode())
chsrc_confirm_source(&source);
char *cmd = NULL;
if (!chsrc_in_project_scope_mode())
chsrc_alert2 ("Poetry 仅支持项目级换源");
cmd = xy_2strcat ("poetry source add my_mirror ", source.url);
char *cmd = xy_2strcat ("poetry source add my_mirror ", source.url);
chsrc_run (cmd, RunOpt_No_Last_New_Line);
if (chsrc_in_standalone_mode())

View File

@@ -19,7 +19,11 @@ pl_python_rye_prelude (void)
chef_set_cooks (this, 1, "@ccmywish");
chef_set_sauciers (this, 0);
chef_allow_local_mode (this, FullyCan, NULL, NULL);
chef_set_scope_cap (this, ProjectScope, ScopeCap_Unknown);
chef_set_scope_cap (this, UserScope, ScopeCap_Able_And_Implemented);
chef_set_scope_cap (this, SystemScope, ScopeCap_Unable);
chef_set_default_scope (this, UserScope);
chef_allow_english(this);
chef_allow_user_define(this);

View File

@@ -41,7 +41,12 @@ pl_python_group_prelude (void)
chef_set_cooks (this, 2, "@ccmywish", "@happy-game");
chef_set_sauciers (this, 3, "@xyx1926885268", "@Kattos", "@Mikachu2333");
chef_allow_local_mode (this, PartiallyCan, "部分包管理器支持项目级换源", "Some package managers support project-level source changing");
/* 部分包管理器支持 ProjectScope但是为了让流程执行下去我们这里都写 ScopeCap_Able_And_Implemented */
chef_set_scope_cap (this, ProjectScope, ScopeCap_Able_And_Implemented);
chef_set_scope_cap (this, UserScope, ScopeCap_Able_And_Implemented);
chef_set_scope_cap (this, SystemScope, ScopeCap_Unable);
chef_set_default_scope (this, UserScope);
chef_allow_english(this);
chef_allow_user_define(this);

View File

@@ -17,7 +17,11 @@ pl_python_pip_prelude (void)
chef_set_cooks (this, 1, "@ccmywish");
chef_set_sauciers (this, 1, "@happy-game");
chef_allow_local_mode (this, CanNot, NULL, NULL);
chef_set_scope_cap (this, ProjectScope, ScopeCap_Unable);
chef_set_scope_cap (this, UserScope, ScopeCap_Able_And_Implemented);
chef_set_scope_cap (this, SystemScope, ScopeCap_Unable);
chef_set_default_scope (this, UserScope);
chef_allow_english(this);
chef_allow_user_define(this);

View File

@@ -17,7 +17,11 @@ pl_python_uv_prelude (void)
chef_set_cooks (this, 2, "@happy-game", "@MingriLingran");
chef_set_sauciers (this, 2, "@Kattos", "@ccmywish");
chef_allow_local_mode (this, FullyCan, NULL, NULL);
chef_set_scope_cap (this, ProjectScope, ScopeCap_Able_And_Implemented);
chef_set_scope_cap (this, UserScope, ScopeCap_Able_And_Implemented);
chef_set_scope_cap (this, SystemScope, ScopeCap_Able_But_Not_Implemented);
chef_set_default_scope (this, UserScope);
chef_allow_english(this);
chef_allow_user_define(this);