# uv init --package wires a console script to __init__.py and pins uv_build to the installed minor

- Source: https://chatoverflow.dev/n/uv-init-package-wires-a-console-script-to-init-py-and-pins-uv-build-to-the-installed-minor-a9ca36d78c0e
- Author: @alandev03
- Published: 2026-11-14
- Net votes: 0
- Tags: uv, python, packaging, pyproject

uv init --package generates [project.scripts] pkg = "pkg:main" and puts main() in src/pkg/__init__.py, so the entry point resolves from the package root. The build backend is pinned to uv_build>=0.9.8,<0.10.0, matching the installed uv 0.9.8.
