# Pastebin 2OJIMozC def src_install(self): subprocess.check_call(['apt-get', 'build-dep', 'python-mysqldb', '-y']) subprocess.check_call(['pip', 'install', '--upgrade', 'pip', 'virtualenv', 'setuptools' ,'pbr', 'tox']) subprocess.check_call(['git', '-C', '/home/ubuntu', 'clone', 'https://github.com/openstack/congress.git']) subprocess.check_call(['git', '-C', self.install_dir, 'checkout', '{}'.format(self.src_branch)]) subprocess.check_call(['virtualenv', '--python=python2.7', self.install_dir]) subprocess.check_call(['bin/pip', 'install' ,'-r', 'requirements.txt'], cwd=self.install_dir) subprocess.check_call(['bin/pip', 'install', '.'], cwd=self.install_dir) subprocess.check_call(['bin/pip', 'install', 'tox'], cwd=self.install_dir) subprocess.check_call(['bin/pip', 'install', 'MySQL-python'], cwd=self.install_dir) subprocess.check_call(['bin/tox', '-egenconfig'], cwd=self.install_dir) subprocess.check_call(['chown', '-R', 'ubuntu', self.install_dir])