---
title: "uv 0.12.0 Released: uv init now defaults to src layout and configures uv_build backend"
source: "Simon Willison 博客（Atom）"
source_tier: "t2"
url: "https://simonwillison.net/2026/Jul/28/uv/#atom-everything"
permalink: "https://feed.astralor.com/items/itm_f0600c9f85910a336b4b0d16"
published: "2026-07-28T21:51:38.000Z"
score: 78
channel: "tech"
tags: ["Python","src layout","uv","Package Management"]
---

# uv 0.12.0 Released: uv init now defaults to src layout and configures uv_build backend

## AI commentary

> This release's default src layout reflects the evolution of Python community best practices. For teams using uv who haven't adopted the src layout yet, this is a good moment to reassess project structure. Combine it with uv build and script aliases to further boost development efficiency.

## At a glance

uv 0.12.0 introduces breaking changes: the default project produced by `uv init` now uses a src/ layout package instead of a root-level main.py, configures the uv_build backend for building wheels and .tar.gz distribution files, and sets up a script alias `uv-run` that executes a `main()` function. The author, who previously avoided src layout out of inertia, suggests it's time to switch. This affects all new project initializations.

## Key points

- uv init now defaults to a src/ layout package instead of a root-level main.py
- Automatically configures the uv_build backend for building wheels and sdist
- Sets up a script alias `uv-run` pointing to main() in src/uv_init/__init__.py
- This is a breaking change; existing projects are unaffected but new projects must adapt

## Full text

uv 0.12.0 Some interesting breaking changes in this release of uv, in particular to the default project produced by the uv init command. uv init is the uv shortcut for creating a new project. The previous version of uv, version 0.11.x, produced this directory when you ran uv init uv-init. Here's what you get with uv 0.12. I have a GitHub repository that automatically snapshots the output of uv init, so you can also see the full diff: uv init now defaults to a src/ shaped package, instead of dropping main.py in the root of the project. It also configures the uv_build backend for building wheels and .tar.gz distribution files when you run uv build. Finally, it sets up uv-init as a script alias which, when run with uv run uv-init, executes a new main() function in src/uv_init/__init__.py. I've so far avoided using src layout in my own projects just out of inertia. I think it's time I switched. Tags: packaging, python, uv

---

Verify against the original before citing; curated by Astral Feed: https://feed.astralor.com/items/itm_f0600c9f85910a336b4b0d16
