mirror of
https://github.com/RubyMetric/chsrc
synced 2025-07-17 12:47:28 +08:00
Using group name
This commit is contained in:
parent
f9b3362dbd
commit
a71a39230b
@ -28,7 +28,7 @@ pl_python_pdm_getsrc (char *option)
|
||||
void
|
||||
pl_python_pdm_setsrc (char *option)
|
||||
{
|
||||
chsrc_yield_source (pl_python);
|
||||
chsrc_yield_source (pl_python_group);
|
||||
if (chsrc_in_standalone_mode())
|
||||
chsrc_confirm_source;
|
||||
|
||||
@ -82,4 +82,4 @@ pl_python_pdm_feat (char *option)
|
||||
}
|
||||
|
||||
// def_target_gsrf(pl_python_pdm);
|
||||
Target_t pl_python_pdm_target = {def_target_inner_gsrf(pl_python_pdm),def_target_sourcesn(pl_python)};
|
||||
Target_t pl_python_pdm_target = {def_target_inner_gsrf(pl_python_pdm),def_target_sourcesn(pl_python_group)};
|
||||
|
@ -27,7 +27,7 @@ pl_python_poetry_getsrc (char *option)
|
||||
void
|
||||
pl_python_poetry_setsrc (char *option)
|
||||
{
|
||||
chsrc_yield_source (pl_python);
|
||||
chsrc_yield_source (pl_python_group);
|
||||
if (chsrc_in_standalone_mode())
|
||||
chsrc_confirm_source;
|
||||
|
||||
@ -78,4 +78,4 @@ pl_python_poetry_feat (char *option)
|
||||
}
|
||||
|
||||
// def_target_gsrf(pl_python_poetry);
|
||||
Target_t pl_python_poetry_target = {def_target_inner_gsrf(pl_python_poetry),def_target_sourcesn(pl_python)};
|
||||
Target_t pl_python_poetry_target = {def_target_inner_gsrf(pl_python_poetry),def_target_sourcesn(pl_python_group)};
|
||||
|
@ -5,12 +5,12 @@
|
||||
* Contributors : happy game <happygame1024@gmail.com>
|
||||
* |
|
||||
* Created On : <2023-09-03>
|
||||
* Last Modified : <2024-12-11>
|
||||
* Last Modified : <2025-07-14>
|
||||
*
|
||||
* ------------------------------------------------------------*/
|
||||
|
||||
void
|
||||
pl_python_getsrc (char *option)
|
||||
pl_python_group_getsrc (char *option)
|
||||
{
|
||||
bool pdm_exist = false,
|
||||
poetry_exist = false,
|
||||
@ -41,7 +41,7 @@ pl_python_getsrc (char *option)
|
||||
|
||||
|
||||
void
|
||||
pl_python_setsrc (char *option)
|
||||
pl_python_group_setsrc (char *option)
|
||||
{
|
||||
{
|
||||
char *msg = ENGLISH ? "Three package managers will be replaced for you at the same time: "
|
||||
@ -58,7 +58,7 @@ pl_python_setsrc (char *option)
|
||||
pl_python_check_unofficial_pkger (&poetry_exist, &pdm_exist, &uv_exist);
|
||||
|
||||
chsrc_set_target_group_mode ();
|
||||
chsrc_yield_source_and_confirm (pl_python);
|
||||
chsrc_yield_source_and_confirm (pl_python_group);
|
||||
|
||||
|
||||
// 交给后面检查命令的存在性
|
||||
@ -86,14 +86,14 @@ pl_python_setsrc (char *option)
|
||||
}
|
||||
|
||||
void
|
||||
pl_python_resetsrc (char *option)
|
||||
pl_python_group_resetsrc (char *option)
|
||||
{
|
||||
pl_python_setsrc (option);
|
||||
pl_python_group_setsrc (option);
|
||||
}
|
||||
|
||||
|
||||
Feature_t
|
||||
pl_python_feat (char *option)
|
||||
pl_python_group_feat (char *option)
|
||||
{
|
||||
Feature_t f = {0};
|
||||
|
||||
@ -101,11 +101,11 @@ pl_python_feat (char *option)
|
||||
f.can_reset = true;
|
||||
|
||||
f.cap_locally = PartiallyCan;
|
||||
f.cap_locally_explain = "Support `Poetry` & `PDM`, `uv`. No support for `pip`";
|
||||
f.cap_locally_explain = "Support Poetry, PDM, uv. No support for pip";
|
||||
f.can_english = false;
|
||||
f.can_user_define = true;
|
||||
|
||||
return f;
|
||||
}
|
||||
|
||||
def_target_gsrf(pl_python);
|
||||
def_target_gsrf(pl_python_group);
|
||||
|
@ -39,7 +39,7 @@ void
|
||||
pl_python_rye_setsrc (char *option)
|
||||
{
|
||||
/* 并不在 Python group 中,所以不考虑 target group 情况 */
|
||||
chsrc_yield_source_and_confirm (pl_python);
|
||||
chsrc_yield_source_and_confirm (pl_python_group);
|
||||
|
||||
const char *file = xy_strjoin (7,
|
||||
"[[sources]]\n",
|
||||
@ -87,4 +87,4 @@ pl_python_rye_feat (char *option)
|
||||
}
|
||||
|
||||
// def_target_gsrf(pl_python_rye);
|
||||
Target_t pl_python_rye_target = {def_target_inner_gsrf(pl_python_rye),def_target_sourcesn(pl_python)};
|
||||
Target_t pl_python_rye_target = {def_target_inner_gsrf(pl_python_rye),def_target_sourcesn(pl_python_group)};
|
||||
|
@ -26,7 +26,7 @@ static SourceProvider_t pl_python_pypi_upstream =
|
||||
* @update 2025-07-11
|
||||
* @note 不要添加Zju,浙大的PyPI服务在校外访问会自动转向Tuna
|
||||
*/
|
||||
static Source_t pl_python_sources[] =
|
||||
static Source_t pl_python_group_sources[] =
|
||||
{
|
||||
{&pl_python_pypi_upstream, "https://pypi.org/simple", DelegateToUpstream},
|
||||
|
||||
@ -72,7 +72,7 @@ static Source_t pl_python_sources[] =
|
||||
/* 不启用原因:24小时更新一次 */
|
||||
// {&Netease, "https://mirrors.163.com/.help/pypi.html", NULL}
|
||||
};
|
||||
def_sources_n(pl_python);
|
||||
def_sources_n(pl_python_group);
|
||||
|
||||
void
|
||||
pl_python_check_unofficial_pkger (bool *poetry_exist, bool *pdm_exist, bool *uv_exist)
|
||||
|
@ -38,7 +38,7 @@ pl_python_pip_setsrc (char *option)
|
||||
return;
|
||||
}
|
||||
|
||||
chsrc_yield_source (pl_python);
|
||||
chsrc_yield_source (pl_python_group);
|
||||
if (chsrc_in_standalone_mode())
|
||||
chsrc_confirm_source;
|
||||
|
||||
@ -91,4 +91,4 @@ pl_python_pip_feat (char *option)
|
||||
}
|
||||
|
||||
// def_target_gsrf(pl_python_pip);
|
||||
Target_t pl_python_pip_target = {def_target_inner_gsrf(pl_python_pip),def_target_sourcesn(pl_python)};
|
||||
Target_t pl_python_pip_target = {def_target_inner_gsrf(pl_python_pip),def_target_sourcesn(pl_python_group)};
|
||||
|
@ -96,7 +96,7 @@ pl_python_uv_setsrc (char *option)
|
||||
{
|
||||
chsrc_ensure_program ("uv");
|
||||
|
||||
chsrc_yield_source (pl_python);
|
||||
chsrc_yield_source (pl_python_group);
|
||||
if (chsrc_in_standalone_mode())
|
||||
chsrc_confirm_source;
|
||||
|
||||
@ -210,4 +210,4 @@ pl_python_uv_feat (char *option)
|
||||
}
|
||||
|
||||
// def_target_gsrf(pl_python_uv);
|
||||
Target_t pl_python_uv_target = {def_target_inner_gsrf(pl_python_uv),def_target_sourcesn(pl_python)};
|
||||
Target_t pl_python_uv_target = {def_target_inner_gsrf(pl_python_uv),def_target_sourcesn(pl_python_group)};
|
||||
|
@ -14,7 +14,7 @@
|
||||
static const char
|
||||
*pl_ruby [] = {"gem", "ruby", "rb", "rubygem", "rubygems", "bundler", NULL, t(&pl_ruby_target)},
|
||||
|
||||
*pl_python[] = {"python", "pypi", "py", NULL, t(&pl_python_target)},
|
||||
*pl_python[] = {"python", "pypi", "py", NULL, t(&pl_python_group_target)},
|
||||
*pl_python_pip[] = {"pip", NULL, t(&pl_python_pip_target)},
|
||||
*pl_python_poetry[] = {"poetry", NULL, t(&pl_python_poetry_target)},
|
||||
*pl_python_pdm[] = {"pdm", NULL, t(&pl_python_pdm_target)},
|
||||
|
Loading…
x
Reference in New Issue
Block a user