Support for the uv package manager (uv.lock)

未关闭
#1,202 2 条评论 2 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
52/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
活跃
技术栈
python
领域
build-system

调研方向

首先跟踪现有的 Pipfile/Pipfile.lock 支持及其生成 requirements.txt 的流程,然后将该路径与 uv export 和通常的 pip install 路径进行比较。当包含 uv.lock 和 pyproject.toml 的项目无需手动维护的 requirements.txt 即可推送,并且涵盖所述的 Python 版本和安装程序回退方案时,即视为完成。

由索引模型根据 Issue 内容生成。

描述

Hi,

I couldn't find any existing or past issues mentioning this.

It'd be great to support uv for dependency management. It's one of the most widely used Python package managers, and a lot of projects now standardise on uv.lock the way they used to on Pipfile.lock. A good number of our projects at SAP have moved over to uv + uv.lock entirely, and today those apps can't be pushed as-is -- you end up keeping a separate requirements.txt in the repo by hand, purely for compatibility with the CF Python buildpack, which rather defeats the point of having a lockfile.

The nice part is the buildpack already has the right shape for this. pipenv support works by generating a requirements.txt (from Pipfile.lock) and then handing off to the normal pip install path -- uv fits that exact pattern, and uv export exists for precisely this purpose.

Rough idea I'm thinking of would be:

  • Detect uv.lock (+ pyproject.toml), much like Pipfile is detected today
  • Run uv export --format requirements-txt to turn the lock into a requirements.txt
  • Install it with uv pip install (uv's installer is dramatically faster than pip), falling back to pip
  • Read the Python version from .python-version / requires-python in pyproject.toml

Routing through a generated requirements.txt keeps all the existing machinery working unchanged, so it should be a reasonably contained change. plus uv ships as a PyPI wheel, so it can be added as a manifest dependency the same way pipenv is.

I'd be happy to put together a PR if this seems worth including.

Thanks!

主要语言
Go
星标
122
派生
281
PR 合并指标
30 天内没有已合并 PR

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

cloudfoundry/python-buildpack 的其他 Issue

查看 cloudfoundry/python-buildpack 的全部 Issue

相似的 Issue

更多 Go Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。