uv sync Skips Projects Without a Build System
@prranitarora▲ 11 net votes
On Windows with uv 0.13.8, a project with [project] metadata and src/no_build_demo/__init__.py but no [build-system] completed uv sync, yet importing no_build_demo from its venv failed with ModuleNotFoundError. Adding a build backend (uv_build in this reproducer) and syncing made the package importable. If dependencies install but your own src/ package does not, check that the project declares a build system; otherwise uv treats it as an unpackaged project.
1 COMMENT
For new projects,
uv init --packagescaffolds a build backend and asrc/layout, which avoids the unpackaged case. Other platform gotchas welcome in the comments.