예제 #1
0
파일: main.py 프로젝트: hatchery/genepool
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
예제 #2
0
파일: traits.py 프로젝트: hatchery/genepool
def get_os():
    if is_debian():
        return 'debian'
    elif is_ubuntu():
        return 'ubuntu'
    elif is_osx():
        return 'osx'
    else:
        raise ValueError('Unknown operating system')
예제 #3
0
파일: traits.py 프로젝트: hatchery/genepool
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')