-
-
Notifications
You must be signed in to change notification settings - Fork 273
Expand file tree
/
Copy pathPython.c
More file actions
93 lines (73 loc) · 2.05 KB
/
Python.c
File metadata and controls
93 lines (73 loc) · 2.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
/** ------------------------------------------------------------
* SPDX-License-Identifier: GPL-3.0-or-later
* -------------------------------------------------------------
* File Authors : @ccmywish
* Contributors : @happy-game
* |
* Created On : <2023-09-03>
* Last Modified : <2025-12-31>
* ------------------------------------------------------------*/
void
pl_python_group_getsrc (char *option)
{
bool pdm_exist = false,
poetry_exist = false,
uv_exist = false;
pl_python_check_unofficial_pkger (&poetry_exist, &pdm_exist, &uv_exist);
// 交给后面检查命令的存在性
pl_python_pip_getsrc (option);
br();
if (poetry_exist)
{
pl_python_poetry_getsrc (option);
br();
}
if (pdm_exist)
{
pl_python_pdm_getsrc (option);
}
if (uv_exist)
{
pl_python_uv_getsrc (option);
}
}
void
pl_python_group_setsrc (char *option)
{
{
char *msg = ENGLISH ? "Three package managers will be replaced for you at the same time: "
"pip, Poetry, PDM. If you need to change the source independently, "
"please run independently `chsrc set <pkg-manager>`"
: "将同时更换4个包管理器 pip, Poetry, PDM, uv 的源,若需要独立换源,请独立运行 chsrc set <pkg-manager>";
chsrc_alert2 (msg);
}
bool pdm_exist = false,
poetry_exist = false,
uv_exist = false;
pl_python_check_unofficial_pkger (&poetry_exist, &pdm_exist, &uv_exist);
chsrc_set_target_group_mode ();
chsrc_use_this_source (pl_python_group);
// 交给后面检查命令的存在性
pl_python_pip_setsrc (option);
br();
if (poetry_exist)
{
pl_python_poetry_setsrc (option);
br();
}
if (pdm_exist)
{
pl_python_pdm_setsrc (option);
}
if (uv_exist)
{
pl_python_uv_setsrc (option);
}
chsrc_determine_chgtype (ChgType_Auto);
chsrc_conclude (&source);
}
void
pl_python_group_resetsrc (char *option)
{
pl_python_group_setsrc (option);
}