pub struct MigraphxPythonInstaller { /* private fields */ }Expand description
The MIGraphX Python installer.
Implementations§
Source§impl MigraphxPythonInstaller
impl MigraphxPythonInstaller
Sourcepub fn new(config: MigraphxPythonConfig) -> Self
pub fn new(config: MigraphxPythonConfig) -> Self
Create a new MIGraphX Python installer with the given config.
Sourcepub fn with_defaults() -> Self
pub fn with_defaults() -> Self
Create with default config.
Sourcepub fn build_install_command(&self) -> ShellCommand
pub fn build_install_command(&self) -> ShellCommand
Construct the pip install command for MIGraphX Python.
The original script runs:
uv pip install migraphx or pip install migraphx
With optional --break-system-packages for global installs.
Sourcepub fn build_uv_install_command(&self) -> ShellCommand
pub fn build_uv_install_command(&self) -> ShellCommand
Construct the uv pip install command (preferred method).
Sourcepub fn build_migraphx_check_command(&self) -> ShellCommand
pub fn build_migraphx_check_command(&self) -> ShellCommand
Construct the command to check if MIGraphX system package is installed.
Sourcepub fn build_python_import_check(&self) -> ShellCommand
pub fn build_python_import_check(&self) -> ShellCommand
Construct the command to verify MIGraphX Python module import.
Sourcepub fn build_rocm_env(&self) -> Vec<(String, String)>
pub fn build_rocm_env(&self) -> Vec<(String, String)>
Construct the ROCm environment setup for the install.
Sourcepub fn package_name(&self) -> &'static str
pub fn package_name(&self) -> &'static str
Get the package name.
Sourcepub fn is_available_on_distro(&self, distro: &DistroFacade) -> bool
pub fn is_available_on_distro(&self, distro: &DistroFacade) -> bool
Check whether MIGraphX Python bindings are available on the given distro.
On Arch-family distros, the migraphx pip wheel does not exist in PyPI
and there is no python3-migraphx system package. The installation
should be skipped on these distros.
Build a human-readable message explaining why MIGraphX Python bindings
are not available on the given distro. Returns None if available.
Auto Trait Implementations§
impl Freeze for MigraphxPythonInstaller
impl RefUnwindSafe for MigraphxPythonInstaller
impl Send for MigraphxPythonInstaller
impl Sync for MigraphxPythonInstaller
impl Unpin for MigraphxPythonInstaller
impl UnsafeUnpin for MigraphxPythonInstaller
impl UnwindSafe for MigraphxPythonInstaller
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more