更新依赖管理配置,新增使用PyPI镜像源的选项以加速包下载,优化文档以清晰描述镜像源和代理设置,调整相关代码以支持新的配置项。

This commit is contained in:
minecraft1024a
2025-08-13 12:47:09 +08:00
committed by Windpicker-owo
parent d29a57f1a4
commit c9a513d037
5 changed files with 107 additions and 25 deletions

View File

@@ -934,11 +934,17 @@ class DependencyManagementConfig(ConfigBase):
auto_install_timeout: int = 300
"""安装超时时间(秒)"""
use_mirror: bool = False
"""是否使用PyPI镜像源"""
mirror_url: str = ""
"""PyPI镜像源URL如: "https://pypi.tuna.tsinghua.edu.cn/simple" """
use_proxy: bool = False
"""是否使用代理进行包安装"""
"""是否使用网络代理(高级选项)"""
proxy_url: str = ""
"""代理URL如: "http://proxy.example.com:8080""socks5://proxy.example.com:1080" """
"""网络代理URL如: "http://proxy.example.com:8080" """
pip_options: list[str] = field(default_factory=lambda: [
"--no-warn-script-location",