# -*- coding: utf-8 -*-
from setuphelpers import *


def install():
    for soft in installed_softwares('neovim'):
        if Version(soft['version']) < Version(control.get_software_version()):
            run(uninstall_cmd(soft['key']))
    # Declaring local variables
    bin_name = glob.glob("*.msi")[0]

    # Installing the package
    print("Installing: %s" % bin_name)
    install_msi_if_needed(
        bin_name
    )