cloudfoundry / cloudfoundry/python-buildpack

Support for the uv package manager (uv.lock)

Ouverte
#1,202 2 commentaires 2 réactions 0 personnes assignées Voir sur GitHub

Personne n'a encore pris cette issue.

Langage dominant
Go
Étoiles
122
Forks
281
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

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!

Guide de contribution

Ouvrir le guide de contribution

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Piste de recherche

Commencez par suivre la prise en charge existante de Pipfile/Pipfile.lock et son flux de génération de requirements.txt, puis comparez ce chemin avec uv export et le flux normal de pip install. C’est terminé lorsque les projets contenant uv.lock et pyproject.toml peuvent être poussés sans requirements.txt maintenu manuellement, avec les solutions de repli indiquées pour la version de Python et l’installateur prises en charge.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
python
Domaine
build-system
Type d'issue
Fonctionnalité
Difficulté
4/5
Temps estimé
3-5 jours
Activité
Active
Clarté
Plutôt claire
Accessibilité débutants
52/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.