Skip to content

增加uv的python下载镜像#359

Open
Mikachu2333 wants to merge 7 commits into
RubyMetric:devfrom
Mikachu2333:fix/uv
Open

增加uv的python下载镜像#359
Mikachu2333 wants to merge 7 commits into
RubyMetric:devfrom
Mikachu2333:fix/uv

Conversation

@Mikachu2333
Copy link
Copy Markdown
Collaborator

@Mikachu2333 Mikachu2333 commented May 27, 2026

  1. 增加uv的python下载镜像
  2. 现在uv会同时对pypi和python进行换源
  3. uv支持rest
  4. uv换源和reset时响应 -scope

问题描述

  1. uv无法对python下载进行换源
  2. close uv 换源不完整,还需考虑 Python 解释器本身下载地址的换源 #309 uv 换源不完整,还需考虑 Python 解释器本身下载地址的换源 #358

方案与实现

  1. 实现对 ~/.config/uv/uv.toml 中配置的改写,相关参考已写在代码内。

1. 增加uv的python下载镜像
2. 现在uv会同时对pypi和python进行换源
Copilot AI review requested due to automatic review settings May 27, 2026 10:24
@github-actions
Copy link
Copy Markdown

Hi @Mikachu2333,

❤️ 感谢你的贡献!你的 PR 当前基于 main 分支,请修改使用 dev 分支

1 similar comment
@github-actions
Copy link
Copy Markdown

Hi @Mikachu2333,

❤️ 感谢你的贡献!你的 PR 当前基于 main 分支,请修改使用 dev 分支

@Mikachu2333 Mikachu2333 changed the base branch from main to dev May 27, 2026 10:24
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Updates the Python uv recipe to support additional metadata and to configure both PyPI index sources and Python interpreter download mirrors via uv.toml.

Changes:

  • Updated recipe metadata (last-updated dates, sauciers).
  • Improved getsrc behavior with better missing-config handling and printing python-install-mirror when present.
  • Refactored setsrc to write both [[index]] and python-install-mirror, adding multiple GitHub Release mirror candidates for auto-selection.

Comment thread src/recipe/lang/Python/uv.c
Comment thread src/recipe/lang/Python/uv.c
Comment thread src/recipe/lang/Python/uv.c Outdated
Comment thread src/recipe/lang/Python/uv.c Outdated
Comment thread src/recipe/lang/Python/uv.c Outdated
Comment thread src/recipe/lang/Python/uv.c
Comment thread src/recipe/lang/Python/uv.c
Comment thread src/recipe/lang/Python/uv.c
Comment thread src/recipe/lang/Python/uv.c Outdated
Comment thread src/recipe/lang/Python/uv.c Outdated
@Mikachu2333 Mikachu2333 self-assigned this May 27, 2026
@Mikachu2333 Mikachu2333 requested a review from Copilot May 27, 2026 11:25
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 8 comments.

Comment thread src/recipe/lang/Python/uv.c Outdated
Comment thread src/recipe/lang/Python/uv.c
Comment thread src/recipe/lang/Python/uv.c
Comment thread src/recipe/lang/Python/uv.c
Comment thread src/recipe/lang/Python/uv.c
Comment thread src/recipe/lang/Python/uv.c
Comment thread src/recipe/lang/Python/uv.c Outdated
Comment thread src/recipe/lang/Python/uv.c Outdated
@Mikachu2333
Copy link
Copy Markdown
Collaborator Author

@ccmywish READY.

@Mikachu2333 Mikachu2333 requested a review from ccmywish May 27, 2026 11:38
@Mikachu2333
Copy link
Copy Markdown
Collaborator Author

另,由于我的配置文件没有其他设置,所以我没有对复杂场景的edge case做过多考虑。遇到了再说

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

uv 换源不完整,还需考虑 Python 解释器本身下载地址的换源

2 participants