mirror of
https://github.com/astral-sh/uv.git
synced 2025-08-03 10:33:49 +00:00
Add build backend scaffolding (#7662)
This commit is contained in:
parent
9a6f455cbf
commit
c4c5378c0b
11 changed files with 308 additions and 42 deletions
|
@ -389,6 +389,15 @@ pub enum Commands {
|
|||
Build(BuildArgs),
|
||||
/// Upload distributions to an index.
|
||||
Publish(PublishArgs),
|
||||
/// The implementation of the build backend.
|
||||
///
|
||||
/// These commands are not directly exposed to the user, instead users invoke their build
|
||||
/// frontend (PEP 517) which calls the Python shims which calls back into uv with this method.
|
||||
#[command(hide = true)]
|
||||
BuildBackend {
|
||||
#[command(subcommand)]
|
||||
command: BuildBackendCommand,
|
||||
},
|
||||
/// Manage uv's cache.
|
||||
#[command(
|
||||
after_help = "Use `uv help cache` for more details.",
|
||||
|
@ -4389,3 +4398,33 @@ pub struct PublishArgs {
|
|||
)]
|
||||
pub allow_insecure_host: Option<Vec<Maybe<TrustedHost>>>,
|
||||
}
|
||||
|
||||
/// See [PEP 517](https://peps.python.org/pep-0517/) and
|
||||
/// [PEP 660](https://peps.python.org/pep-0660/) for specifications of the parameters.
|
||||
#[derive(Subcommand)]
|
||||
pub enum BuildBackendCommand {
|
||||
/// PEP 517 hook `build_sdist`.
|
||||
BuildSdist { sdist_directory: PathBuf },
|
||||
/// PEP 517 hook `build_wheel`.
|
||||
BuildWheel {
|
||||
wheel_directory: PathBuf,
|
||||
#[arg(long)]
|
||||
metadata_directory: Option<PathBuf>,
|
||||
},
|
||||
/// PEP 660 hook `build_editable`.
|
||||
BuildEditable {
|
||||
wheel_directory: PathBuf,
|
||||
#[arg(long)]
|
||||
metadata_directory: Option<PathBuf>,
|
||||
},
|
||||
/// PEP 517 hook `get_requires_for_build_sdist`.
|
||||
GetRequiresForBuildSdist,
|
||||
/// PEP 517 hook `get_requires_for_build_wheel`.
|
||||
GetRequiresForBuildWheel,
|
||||
/// PEP 517 hook `prepare_metadata_for_build_wheel`.
|
||||
PrepareMetadataForBuildWheel { wheel_directory: PathBuf },
|
||||
/// PEP 660 hook `get_requires_for_build_editable`.
|
||||
GetRequiresForBuildEditable,
|
||||
/// PEP 660 hook `prepare_metadata_for_build_editable`.
|
||||
PrepareMetadataForBuildEditable { wheel_directory: PathBuf },
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue