fmt("[@{cf}{package}@|] {msg}"), "[{package}] <== '{cmd.cmd_str}' failed with return code '{retcode}'": fmt("[@{cf}{package}@|] @!@{rf}<==@| '@!{cmd.cmd_str}@|' @{rf}failed with return code@| '@!{retcode}@|'" ), "[{package}] <== '{cmd.cmd_str}' finished with return code '{retcode}'": fmt("[@{cf}{package}@|] @{gf}<==@| '@!{cmd.cmd_str}@|' finished with return code '@!{retcode}@|'" ), "Finished <== {package:<": fmt("@!@{kf}Finished@| @{gf}<==@| @{cf}{package:<").rstrip(ansi('reset')), "Failed <== {package:<": fmt("@!@{rf}Failed@| @{gf}<==@| @{cf}{package:<").rstrip(ansi('reset')), "} [ {time} ]": fmt("}@| [ @{yf}{time}@| ]"), "[build - {run_time}] ": fmt("[@{pf}build@| - @{yf}{run_time}@|] "), "[{name} - {run_time}] ": fmt("[@{cf}{name}@| - @{yf}{run_time}@|] "), "[{0}/{1} Active | {2}/{3} Completed]": fmt("[@!@{gf}{0}@|/@{gf}{1}@| Active | @!@{gf}{2}@|/@{gf}{3}@| Completed]" ), "[{0}/{1} Jobs | {2}/{3} Active | {4}/{5} Completed]": fmt("[@!@{gf}{0}@|/@{gf}{1}@| Jobs | @!@{gf}{2}@|/@{gf}{3}@| Active | @!@{gf}{4}@|/@{gf}{5}@| Completed]" ), "[!{package}] ": fmt("[@!@{rf}!@|@{cf}{package}@|] "), } color_mapper = ColorMapper(_color_translation_map) clr = color_mapper.clr
from termios import FIONREAD import array import errno import fcntl import os import re import subprocess import time from catkin_tools.common import log from catkin_tools.common import version_tuple from catkin_tools.terminal_color import ColorMapper mapper = ColorMapper() clr = mapper.clr def memory_usage(): """ Get used and total memory usage. :returns: Used and total memory in bytes :rtype: tuple """ # Handle optional psutil support try: import psutil
# See the License for the specific language governing permissions and # limitations under the License. from __future__ import print_function import os import sys from catkin_pkg.packages import find_packages from catkin_tools.argument_parsing import add_context_args from catkin_tools.context import Context from catkin_tools.metadata import find_enclosing_workspace from catkin_tools.terminal_color import ColorMapper color_mapper = ColorMapper() clr = color_mapper.clr def prepare_arguments(parser): add_context_args( parser) # Adds the --profile option, possibly other things. # Behavior behavior_group = parser.add_argument_group('Behavior') add = behavior_group.add_argument add('-e', '--existing-only', action='store_true', help="Only print paths to existing directories.") add('-r',
import xdg from catkin_tools.terminal_color import ColorMapper from catkin_tools.verbs import catkin_config, catkin_build from future.moves.urllib.error import URLError from future.moves.urllib.request import urlopen from .utils import mkdir_p, symlink_force, __name__ as utilsname logger = logging.getLogger(__name__) config_dir = os.path.join(xdg.XDG_CONFIG_HOME, 'ros-get') ws_file = os.path.join(config_dir, 'workspace') ws_dir = os.path.join(config_dir, 'workspaces') clr = ColorMapper().clr def create(rosdistro_index_url, extend_path, dir, name, verbose): """Creates a new workspace, saves it, and switches to it if it is the first workspace. :param rosdistro_index_url: The rosdistro to use :param extend_path: Parent workspace to use. :param dir: Where to create the workspace :param name: Name of the new workspace. :param verbose: Unused. """ # also allow files if os.path.isfile(rosdistro_index_url):