diff --git a/crates/uv-cli/src/lib.rs b/crates/uv-cli/src/lib.rs index ddcad467a..fcb382f09 100644 --- a/crates/uv-cli/src/lib.rs +++ b/crates/uv-cli/src/lib.rs @@ -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. diff --git a/crates/uv/src/commands/build_frontend.rs b/crates/uv/src/commands/build_frontend.rs index 8b5724ec7..c861f5270 100644 --- a/crates/uv/src/commands/build_frontend.rs +++ b/crates/uv/src/commands/build_frontend.rs @@ -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, hash_checking: Option, python: Option, @@ -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(), @@ -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, python_request: Option<&str>, @@ -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, @@ -368,7 +368,7 @@ async fn build_package( client_builder: &BaseClientBuilder<'_>, hash_checking: Option, build_logs: bool, - no_fast_path: bool, + force_pep517: bool, build_constraints: &[RequirementsSource], no_build_isolation: bool, no_build_isolation_package: &[PackageName], @@ -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; diff --git a/crates/uv/src/lib.rs b/crates/uv/src/lib.rs index 63c485225..c242bfa16 100644 --- a/crates/uv/src/lib.rs +++ b/crates/uv/src/lib.rs @@ -732,7 +732,7 @@ async fn run(mut cli: Cli) -> Result { args.sdist, args.wheel, args.build_logs, - args.no_fast_path, + args.force_pep517, build_constraints, args.hash_checking, args.python, diff --git a/crates/uv/src/settings.rs b/crates/uv/src/settings.rs index 5f0c947e9..c66a30f90 100644 --- a/crates/uv/src/settings.rs +++ b/crates/uv/src/settings.rs @@ -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, pub(crate) hash_checking: Option, pub(crate) python: Option, @@ -2048,7 +2048,7 @@ impl BuildSettings { all_packages, sdist, wheel, - no_fast_path, + force_pep517, build_constraints, require_hashes, no_require_hashes, @@ -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), diff --git a/docs/reference/cli.md b/docs/reference/cli.md index 1c54fd068..f1bde17bd 100644 --- a/docs/reference/cli.md +++ b/docs/reference/cli.md @@ -7812,6 +7812,10 @@ uv build [OPTIONS] [SRC]

If a URL, the page must contain a flat list of links to package files adhering to the formats described above.

May also be set with the UV_FIND_LINKS environment variable.

+
--force-pep517

Always build through PEP 517, don’t use the fast path for the uv build backend.

+ +

By default, uv won’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.

+
--help, -h

Display the concise help for this command

--index index

The URLs to use when resolving dependencies, in addition to the default index.

@@ -7910,10 +7914,6 @@ uv build [OPTIONS] [SRC]

Normally, configuration files are discovered in the current directory, parent directories, or user configuration directories.

May also be set with the UV_NO_CONFIG environment variable.

-
--no-fast-path

Always build through PEP 517, don’t use the fast path for the uv build backend.

- -

By default, uv won’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.

-
--no-index

Ignore the registry index (e.g., PyPI), instead relying on direct URL dependencies and those provided via --find-links

--no-progress

Hide all progress outputs.