Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion crates/uv-cli/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2184,7 +2184,7 @@ pub struct BuildArgs {
/// backend, but use a fast path that calls into the build backend directly. This option forces
/// always using PEP 517.
#[arg(long)]
pub no_fast_path: bool,
pub force_pep517: bool,

/// Constrain build dependencies using the given requirements files when building
/// distributions.
Expand Down
12 changes: 6 additions & 6 deletions crates/uv/src/commands/build_frontend.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ pub(crate) async fn build_frontend(
sdist: bool,
wheel: bool,
build_logs: bool,
no_fast_path: bool,
force_pep517: bool,
build_constraints: Vec<RequirementsSource>,
hash_checking: Option<HashCheckingMode>,
python: Option<String>,
Expand All @@ -77,7 +77,7 @@ pub(crate) async fn build_frontend(
sdist,
wheel,
build_logs,
no_fast_path,
force_pep517,
&build_constraints,
hash_checking,
python.as_deref(),
Expand Down Expand Up @@ -120,7 +120,7 @@ async fn build_impl(
sdist: bool,
wheel: bool,
build_logs: bool,
no_fast_path: bool,
force_pep517: bool,
build_constraints: &[RequirementsSource],
hash_checking: Option<HashCheckingMode>,
python_request: Option<&str>,
Expand Down Expand Up @@ -271,7 +271,7 @@ async fn build_impl(
&client_builder,
hash_checking,
build_logs,
no_fast_path,
force_pep517,
build_constraints,
no_build_isolation,
no_build_isolation_package,
Expand Down Expand Up @@ -368,7 +368,7 @@ async fn build_package(
client_builder: &BaseClientBuilder<'_>,
hash_checking: Option<HashCheckingMode>,
build_logs: bool,
no_fast_path: bool,
force_pep517: bool,
build_constraints: &[RequirementsSource],
no_build_isolation: bool,
no_build_isolation_package: &[PackageName],
Expand Down Expand Up @@ -538,7 +538,7 @@ async fn build_package(

// Check if the build backend is matching uv version that allows calling in the uv build backend
// directly.
let fast_path = !no_fast_path && check_fast_path(source.path());
let fast_path = !force_pep517 && check_fast_path(source.path());

// Prepare some common arguments for the build.
let dist = None;
Expand Down
2 changes: 1 addition & 1 deletion crates/uv/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -732,7 +732,7 @@ async fn run(mut cli: Cli) -> Result<ExitStatus> {
args.sdist,
args.wheel,
args.build_logs,
args.no_fast_path,
args.force_pep517,
build_constraints,
args.hash_checking,
args.python,
Expand Down
6 changes: 3 additions & 3 deletions crates/uv/src/settings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2029,7 +2029,7 @@ pub(crate) struct BuildSettings {
pub(crate) sdist: bool,
pub(crate) wheel: bool,
pub(crate) build_logs: bool,
pub(crate) no_fast_path: bool,
pub(crate) force_pep517: bool,
pub(crate) build_constraints: Vec<PathBuf>,
pub(crate) hash_checking: Option<HashCheckingMode>,
pub(crate) python: Option<String>,
Expand All @@ -2048,7 +2048,7 @@ impl BuildSettings {
all_packages,
sdist,
wheel,
no_fast_path,
force_pep517,
build_constraints,
require_hashes,
no_require_hashes,
Expand Down Expand Up @@ -2079,7 +2079,7 @@ impl BuildSettings {
.into_iter()
.filter_map(Maybe::into_option)
.collect(),
no_fast_path,
force_pep517,
hash_checking: HashCheckingMode::from_args(
flag(require_hashes, no_require_hashes),
flag(verify_hashes, no_verify_hashes),
Expand Down
8 changes: 4 additions & 4 deletions docs/reference/cli.md
Original file line number Diff line number Diff line change
Expand Up @@ -7812,6 +7812,10 @@ uv build [OPTIONS] [SRC]
<p>If a URL, the page must contain a flat list of links to package files adhering to the formats described above.</p>

<p>May also be set with the <code>UV_FIND_LINKS</code> environment variable.</p>
</dd><dt><code>--force-pep517</code></dt><dd><p>Always build through PEP 517, don&#8217;t use the fast path for the uv build backend.</p>

<p>By default, uv won&#8217;t create a PEP 517 build environment for packages using the uv build backend, but use a fast path that calls into the build backend directly. This option forces always using PEP 517.</p>

</dd><dt><code>--help</code>, <code>-h</code></dt><dd><p>Display the concise help for this command</p>

</dd><dt><code>--index</code> <i>index</i></dt><dd><p>The URLs to use when resolving dependencies, in addition to the default index.</p>
Expand Down Expand Up @@ -7910,10 +7914,6 @@ uv build [OPTIONS] [SRC]
<p>Normally, configuration files are discovered in the current directory, parent directories, or user configuration directories.</p>

<p>May also be set with the <code>UV_NO_CONFIG</code> environment variable.</p>
</dd><dt><code>--no-fast-path</code></dt><dd><p>Always build through PEP 517, don&#8217;t use the fast path for the uv build backend.</p>

<p>By default, uv won&#8217;t create a PEP 517 build environment for packages using the uv build backend, but use a fast path that calls into the build backend directly. This option forces always using PEP 517.</p>

</dd><dt><code>--no-index</code></dt><dd><p>Ignore the registry index (e.g., PyPI), instead relying on direct URL dependencies and those provided via <code>--find-links</code></p>

</dd><dt><code>--no-progress</code></dt><dd><p>Hide all progress outputs.</p>
Expand Down