Improve note about build system in publish guide (#16788)

Addresses
https://github.com/astral-sh/uv/issues/5605#issuecomment-3549958048
This commit is contained in:
Zanie Blue 2025-11-20 13:59:59 -06:00 committed by GitHub
parent aebd7578bb
commit 5eda329e5a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 6 additions and 4 deletions

View File

@ -8,15 +8,17 @@ description: A guide to using uv to build and publish Python packages to a packa
uv supports building Python packages into source and binary distributions via `uv build` and uv supports building Python packages into source and binary distributions via `uv build` and
uploading them to a registry with `uv publish`. uploading them to a registry with `uv publish`.
## Preparing your project for packaging ## Preparing your project
Before attempting to publish your project, you'll want to make sure it's ready to be packaged for Before attempting to publish your project, you'll want to make sure it's ready to be packaged for
distribution. distribution.
If your project does not include a `[build-system]` definition in the `pyproject.toml`, uv will not If your project does not include a `[build-system]` definition in the `pyproject.toml`, uv will not
build it by default. This means that your project may not be ready for distribution. Read more about build it during `uv sync` operations in the project, but will fall back to the legacy setuptools
the effect of declaring a build system in the build system during `uv build`.
[project concept](../concepts/projects/config.md#build-systems) documentation.
We strongly recommend configuring a build system. Read more about build systems in the
[project configuration](../concepts/projects/config.md#build-systems) documentation.
## Building your package ## Building your package