SourceBuildTrait

Trait SourceBuildTrait 

Source
pub trait SourceBuildTrait {
    // Required methods
    fn metadata(
        &mut self,
    ) -> impl Future<Output = Result<Option<PathBuf>, AnyErrorBuild>>;
    fn wheel<'a>(
        &'a self,
        wheel_dir: &'a Path,
    ) -> impl Future<Output = Result<String, AnyErrorBuild>> + 'a;
}
Expand description

A wrapper for uv_build::SourceBuild to avoid cyclical crate dependencies.

You can either call only wheel() to build the wheel directly, call only metadata() to get the metadata without performing the actual or first call metadata() and then wheel().

Required Methods§

Source

fn metadata( &mut self, ) -> impl Future<Output = Result<Option<PathBuf>, AnyErrorBuild>>

A wrapper for uv_build::SourceBuild::get_metadata_without_build.

For PEP 517 builds, this calls prepare_metadata_for_build_wheel

Returns the metadata directory if we’re having a PEP 517 build and the prepare_metadata_for_build_wheel hook exists

Source

fn wheel<'a>( &'a self, wheel_dir: &'a Path, ) -> impl Future<Output = Result<String, AnyErrorBuild>> + 'a

A wrapper for uv_build::SourceBuild::build.

For PEP 517 builds, this calls build_wheel.

Returns the filename of the built wheel inside the given wheel_dir. The filename is a string and not a WheelFilename because the on disk filename might not be normalized in the same way as uv would.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§