from bloom.util import handle_global_arguments from bloom.util import maybe_continue from bloom.util import quiet_git_clone_warning from bloom.util import safe_input try: from vcstools.vcs_abstraction import get_vcs_client except ImportError: debug(traceback.format_exc()) error("vcstools was not detected, please install it.", file=sys.stderr, exit=True) upstream_repos = {} _error = get_error_prefix() def get_upstream_repo(uri, vcs_type): global upstream_repos if uri not in upstream_repos: temp_dir = tempfile.mkdtemp() upstream_dir = os.path.join(temp_dir, 'upstream') upstream_repos[uri] = (temp_dir, get_vcs_client(vcs_type, upstream_dir)) return upstream_repos[uri][1] @atexit.register def clean_up_repositories(): global upstream_repos
error("rosdep was not detected, please install it.", file=sys.stderr, exit=True) try: import catkin_pkg except ImportError: debug(traceback.format_exc()) error("catkin_pkg was not detected, please install it.", file=sys.stderr, exit=True) from catkin_pkg.changelog import get_changelog_from_path _repositories = {} _success = get_success_prefix() _error = get_error_prefix() _user_provided_release_url = None @atexit.register def exit_cleanup(): global _repositories for repo in _repositories.values(): repo_path = repo.get_path() if os.path.exists(repo_path): shutil.rmtree(repo_path) _rosdistro_index = None _rosdistro_distribution_files = {}