Build backend: Rename `--no-fast-path` to `--force-pep517` (#9600)

See https://github.com/astral-sh/uv/pull/9556#discussion_r1865046353
This commit is contained in:
konsti 2024-12-03 11:15:54 +01:00 committed by GitHub
parent b7564f4036
commit cadba18c1f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 15 additions and 15 deletions

View File

@ -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.

View File

@ -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>,
@ -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<HashCheckingMode>,
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<HashCheckingMode>,
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;

View File

@ -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,

View File

@ -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>,
@ -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),

View File

@ -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>
@ -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>