Beispiel #1
0
def _install_ultimate_vim():
    ultimate_vim_path = Path("~/.vim_runtime").expanduser()
    if ultimate_vim_path.is_dir():
        logging.debug("Looks like ultimate_vim is already cloned, " +
                      "skipping cloning ...")
    else:
        utils.try_cmd("git clone --depth=1 " +
                      f"https://github.com/amix/vimrc.git {ultimate_vim_path}")
    utils.try_cmd("sh ~/.vim_runtime/install_awesome_vimrc.sh")
Beispiel #2
0
def _install_duplicity():
    if not os.path.exists(os.path.expanduser("~/duplicity")):
        utils.try_cmd(
            "git clone https://gitlab.com/duplicity/duplicity.git",
            cwd=os.path.expanduser("~"),
        )
    utils.try_cmd(
        "sudo python3 setup.py install",
        cwd=os.path.expanduser("~/duplicity"),
    )
Beispiel #3
0
def _install_more_color_schemes():
    plugins_path = Path("~/.vim_runtime/sources_forked").expanduser()
    colorschemes_path = plugins_path / "vim-colorschemes"
    if not colorschemes_path.is_dir():
        utils.try_cmd(
            "git clone https://github.com/flazz/vim-colorschemes.git",
            cwd=plugins_path,
        )
    else:
        logging.debug("Looks like vim-colorschemes is already cloned, " +
                      "skipping cloning ...")
def _install_tmux_from_url(tarball_url):
    version_tag = _find_version_tag_of_latest_release()
    tarball_file_name = f"tmux-{version_tag}.tar.gz"

    tarball_download_location = f"{os.environ['HOME']}/{tarball_file_name}"

    utils.try_cmd(
        f"cd ~ && " +
        f"curl -L -o {tarball_download_location} {tarball_url} && " +
        f"tar -xzf {tarball_file_name} && " +
        f"cd {tarball_file_name.replace('.tar.gz', '')} && " +
        f"./configure && " + f"make && " + f"sudo make install", )
Beispiel #5
0
def _install_you_complete_me():
    ycm_path_str = "~/.vim_runtime/my_plugins/YouCompleteMe"
    ycm_path = Path(ycm_path_str).expanduser()
    if not ycm_path.is_dir():
        utils.try_cmd(
            "cd ~/.vim_runtime/my_plugins && " +
            "git clone https://github.com/ycm-core/YouCompleteMe.git && " +
            "cd YouCompleteMe && " + "git submodule update --init --recursive")
    else:
        logging.debug("Looks like YouCompleteMe is already cloned, " +
                      "skipping cloning ...")

    python = _get_current_python_interpreter()
    utils.try_cmd("cd ~/.vim_runtime/my_plugins/YouCompleteMe && " +
                  f"{python} install.py --clang-completer")
Beispiel #6
0
def _install_prerequisites():
    apt_dependencies = [
        "git",
        "build-essential",
        "libssl-dev",
        "libffi-dev",
        "apt-utils",
        "python3-dev",
        "python3-pip",
        "python3-distutils-extra",
        "librsync-dev",
    ]
    utils.try_cmd(f"sudo apt-get install -y {' '.join(apt_dependencies)}")

    pip_dependencies = ["future>=0.18.2", "fasteners>=0.15"]
    utils.try_cmd(
        f"python3 -m pip install --user {' '.join(pip_dependencies)}")
Beispiel #7
0
def clone():
    cwd = _get_repository_path().parent
    utils.try_cmd("git clone https://github.com/hallgrimur1471/.dotfiles.git",
                  cwd=cwd)
def _symlink_configs_to_dotfile_repository():
    dotfile_relative_path = Path(".tmux.conf")
    real_path = dotfile_repository.get_path(dotfile_relative_path)
    symlink_path = Path("~").expanduser() / dotfile_relative_path
    utils.cmd(f"rm {symlink_path}")
    utils.try_cmd(f"ln -s '{real_path}' '{symlink_path}'")
def _install_prerequisites():
    apt_dependencies = ["libevent-dev", "libncurses5-dev", "curl"]
    utils.try_cmd(f"sudo apt-get install -y {' '.join(apt_dependencies)}")
Beispiel #10
0
def _tear_down_workspace():
    workspace_path = _get_workspace_path()
    logging.debug("Tearing down integration test workspace ...")
    utils.try_cmd(f"rm -rf {workspace_path}")
Beispiel #11
0
def _set_up_workspace():
    workspace_path = _get_workspace_path()
    logging.debug("Setting up integration test workspace ...")
    utils.try_cmd(f"mkdir -p {workspace_path}")
    return workspace_path
Beispiel #12
0
def _symlink_configs_to_dotfile_repository():
    dotfile_path = Path(".vim_runtime/my_configs.vim")
    real_path = dotfile_repository.get_path(dotfile_path)
    symlink_path = Path("~").expanduser() / dotfile_path
    utils.cmd(f"rm {symlink_path}")
    utils.try_cmd(f"ln -s '{real_path}' '{symlink_path}'")
Beispiel #13
0
def _install_vim():
    utils.try_cmd("sudo apt-get install -y vim")
Beispiel #14
0
def _install_prerequisites():
    utils.try_cmd("sudo apt-get install -y cmake")

    python = _get_current_python_interpreter()
    utils.try_cmd(f"{python} -m pip install python-language-server")
    utils.try_cmd(f"{python} -m pip install mypy")