rbtools.utils.checks¶
Utilities for checking for dependencies.
Functions
Check if GNU diff is installed, and informs the user if it's not. |
|
|
Check if the given command is installed. |
|
Return whether one tuple is greater than or equal to another. |
- rbtools.utils.checks.check_install(command)[source]¶
Check if the given command is installed.
Try executing an external command and return a boolean indicating whether that command is installed or not. The ‘command’ argument should be something that executes quickly, without hitting the network (for instance, ‘svn help’ or ‘git –version’).
- rbtools.utils.checks.check_gnu_diff()[source]¶
Check if GNU diff is installed, and informs the user if it’s not.
Deprecated since version 4.0: Clients should use Diff Tools (see
rbtools.diffs.tools
) instead.This will be removed in 5.0.
- Raises:
Exception – GNU diff is not installed.
- rbtools.utils.checks.is_valid_version(actual, expected)[source]¶
Return whether one tuple is greater than or equal to another.
Tuples should be in the form of:
(major_version, minor_version, micro_version)
With each version an integer.
Deprecated since version 4.0: Consumers should just compare tuples directly. This will be removed in RBTools 5.0.