rbtools.commands.install¶
Implementation of rbt install.
Classes
|
Install a dependency. |
- class rbtools.commands.install.Install(transport_cls: type[Transport] = <class 'rbtools.api.transport.sync.SyncTransport'>, stdout: TextIO = <_io.TextIOWrapper name='<stdout>' mode='w' encoding='utf-8'>, stderr: TextIO = <_io.TextIOWrapper name='<stderr>' mode='w' encoding='utf-8'>, stdin: TextIO = <_io.TextIOWrapper name='<stdin>' mode='r' encoding='utf-8'>)[source]¶
Bases:
BaseCommandInstall a dependency.
This allows RBTools to install external dependencies that may be needed for some features.
- __firstlineno__ = 21¶
- __static_attributes__ = ()¶
- args: ClassVar[str] = '<package>'[source]¶
Usage text for what arguments the command takes.
Arguments for the command are anything passed in other than defined options (for example, revisions passed to rbt post).
- Type:
- check_download(url, zip_filename)[source]¶
Check to see if the file was successfully downloaded.
If the user has gpg installed on their system, use that to check that the package was signed. Otherwise, check the sha256sum.
- description: ClassVar[str] = 'Install an optional dependency.'[source]¶
A short description of the command, suitable for display in usage text.
- Type:
- download_file(url, label=None)[source]¶
Download the given file.
This is intended to be used as a context manager, and the bound value will be the filename of the downloaded file.
- Parameters:
- Yields:
unicode– The filename of the downloaded file.- Raises:
rbtools.commands.CommandError – An error occurred while downloading the file.
- main(package)[source]¶
Run the command.
- Parameters:
package (
unicode) – The name of the package to install.- Raises:
rbtools.commands.CommandError – An error occurred during installation.
- option_list: ClassVar[list[Option | OptionGroup]] = [][source]¶
Command-line options for this command.
- Type:
listofOptionorOptionGroup