Add alias pdm for Python

[GitHub link #19]
This commit is contained in:
Aoran Zeng 2024-06-05 13:17:22 +08:00
parent ad0407b286
commit e72b07604c
2 changed files with 5 additions and 3 deletions

View File

@ -104,7 +104,7 @@ chsrc set ruby rubychina # 使用 RubyChina 作为镜像站
```bash ```bash
chsrc set ruby 或 set gem chsrc set ruby 或 set gem
chsrc set python 或 set pip chsrc set python 或 set pip / pdm # 同时换pip和pdm
chsrc set node 或 set npm / nodejs / yarn / pnpm # 同时换3个 chsrc set node 或 set npm / nodejs / yarn / pnpm # 同时换3个
chsrc set perl 或 set cpan chsrc set perl 或 set cpan
chsrc set php 或 set composer chsrc set php 或 set composer

View File

@ -136,7 +136,9 @@ pl_python_getsrc (char *option)
} }
/** /**
* Python换源https://mirrors.tuna.tsinghua.edu.cn/help/pypi/ * Python换源
* 1. https://mirrors.tuna.tsinghua.edu.cn/help/pypi/
* 2. https://github.com/RubyMetric/chsrc/issues/19
* *
* Windows上调用换源命令 C:\Users\RubyMetric\AppData\Roaming\pip\pip.ini * Windows上调用换源命令 C:\Users\RubyMetric\AppData\Roaming\pip\pip.ini
*/ */
@ -1964,7 +1966,7 @@ TargetInfo
#define t(a) (const char*)(a) #define t(a) (const char*)(a)
static const char static const char
*pl_ruby [] = {"gem", "ruby", "rubygem", "rb", "rubygems",NULL, t(&pl_ruby_target)}, *pl_ruby [] = {"gem", "ruby", "rubygem", "rb", "rubygems",NULL, t(&pl_ruby_target)},
*pl_python[] = {"pip", "python", "pypi", "py", NULL, t(&pl_python_target)}, *pl_python[] = {"pip", "python", "pypi", "py", "pdm", NULL, t(&pl_python_target)},
*pl_nodejs[] = {"npm", "node", "nodejs", "js", "yarn", "pnpm", NULL, t(&pl_nodejs_target)}, *pl_nodejs[] = {"npm", "node", "nodejs", "js", "yarn", "pnpm", NULL, t(&pl_nodejs_target)},
*pl_perl [] = {"perl", "cpan", NULL, t(&pl_perl_target)}, *pl_perl [] = {"perl", "cpan", NULL, t(&pl_perl_target)},
*pl_php [] = {"php", "composer", NULL, t(&pl_php_target)}, *pl_php [] = {"php", "composer", NULL, t(&pl_php_target)},