Beispiel #1
0
def main():
    """Install packages considered necessary to build software"""
    if is_debian() or is_ubuntu():
        apt_get = APTGet()
        apt_get.install('build-essential')
    else:
        # FIXME: we need to support other distros soon
        pass
Beispiel #2
0
def get_os():
    if is_debian():
        return 'debian'
    elif is_ubuntu():
        return 'ubuntu'
    elif is_osx():
        return 'osx'
    else:
        raise ValueError('Unknown operating system')
Beispiel #3
0
def is_ubuntu(versions: Optional[List[str]] = None) -> bool:
    """
    An alias for is_debian that uses Ubuntu as the distro.
    This function returns True if the OS is Ubuntu and the version is in
    the list of versions
    :param versions: a list of acceptable versions for Ubuntu.
    :return: bool, True if platform is Ubuntu.
    """
    return is_debian(versions=versions, distro_name='ubuntu')