LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

uv-build

Build Python packages from source

TLDR

Build package
$ uv build
copy
Build wheel only
$ uv build --wheel
copy
Build sdist only
$ uv build --sdist
copy
Build to specific directory
$ uv build --out-dir [dist]
copy
Build both sdist and wheel
$ uv build --sdist --wheel
copy
Build a specific package in a workspace
$ uv build --package [mypackage]
copy
Build from a specific source directory
$ uv build [src/]
copy

SYNOPSIS

uv build [options] [src]

DESCRIPTION

uv build builds Python packages from source into distributable wheel and/or source distribution packages. It supports PEP 517/518 build systems.By default, uv build builds the project in the current directory and places artifacts in a dist/ subdirectory. Both wheel and sdist are produced by default; use --wheel or --sdist to build only one.Build isolation is enabled by default, installing build dependencies in an isolated environment. Use --no-build-isolation to build using the existing environment instead.

PARAMETERS

--wheel

Build wheel (binary distribution) only.
--sdist
Build source distribution only.
--out-dir dir
Output directory. Default: dist/.
--no-build-isolation
Disable build isolation (use existing environment).
--package name
Build a specific package within the current workspace.
--build-constraint requirement
Constrain versions of build requirements.
--require-hashes
Require hashes for build dependencies for reproducibility.
--python version
Python interpreter to use for build.
--config-setting KEY=VALUE
Pass settings to the PEP 517 build backend.
--all-packages
Build all packages in the workspace.

SEE ALSO

uv(1), uv-publish(1), pip(1), build(1)

Copied to clipboard
Kai