예제 #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
 def test_apt_get_install_no_items_fails(self):
     with patch('genes.process.process.Popen') as mock_popen:
         apt_get = APTGet()
         with self.assertRaises(ValueError):
             apt_get.install()
         mock_popen.assert_not_called()
예제 #3
0
 def test_apt_get_upgrade_with_no_items_calls_popen(self):
     with patch('genes.process.process.Popen') as mock_popen:
         apt_get = APTGet()
         apt_get.upgrade()
         mock_popen.assert_called_once_with(('apt-get', '-y', 'upgrade'))
예제 #4
0
 def test_apt_get_install_multiple_items_calls_popen(self):
     with patch('genes.process.process.Popen') as mock_popen:
         apt_get = APTGet()
         apt_get.install('test1', 'test2')
         mock_popen.assert_called_once_with(('apt-get', '-y', 'install', 'test1', 'test2'))
예제 #5
0
파일: repo.py 프로젝트: hatchery/genepool
 def __init__(self):
     if not APTPkg.is_installed("software-properties-common"):
         apt_get = APTGet()
         apt_get.update()
         apt_get.install("software-properties-common")