buildpacks icon indicating copy to clipboard operation
buildpacks copied to clipboard

Support for pyproject.toml and uv in python buildpack

Open amardeep opened this issue 5 months ago • 2 comments

We (like a lot of new projects) use pyproject.toml to specify dependencies and uv to lock them. Please support pyproject.toml and uv.lock for building python containers.

amardeep avatar Aug 04 '25 12:08 amardeep

We're working on this! should be coming soon.

jama22 avatar Aug 12 '25 21:08 jama22

Great news! Support for pyproject.toml and uv is now available in Public Preview for the Python Buildpack.

Note on requirements.txt: If you are using requirements.txt file, you can opt-in to use uv as your package manager by setting the environment variable GOOGLE_PYTHON_PACKAGE_MANAGER=uv. For Python 3.14+ projects, uv is set to be the new default installer when a requirements.txt is present.

How to Try It

  • For Cloud Run / CRF Deployments (using gcloud): Deploy using the beta track of the gcloud run deploy command
gcloud beta run deploy --source .
  • Using pack CLI: Set the X_GOOGLE_RELEASE_TRACK=BETA environment variable for your build
pack build <your-image-name> --builder gcr.io/buildpacks/builder --env X_GOOGLE_RELEASE_TRACK=BETA

Documentation

You can find the full details on deploying with pyproject.toml in our official documentation: https://docs.cloud.google.com/docs/buildpacks/python

Please give it a try and let us know if you run into any issues or have feedback!

srinjoyray avatar Nov 21 '25 06:11 srinjoyray