Avoid apt-get on Travis if possible.

This should speed up builds as no apt-get update is needed.
This commit is contained in:
Florian Bruhin 2015-10-06 06:20:31 +02:00
parent 98e451c90e
commit d094a495cc

View File

@ -88,16 +88,22 @@ if 'APPVEYOR' in os.environ:
check_setup(r'C:\Python34\python')
elif TRAVIS_OS == 'linux':
print("apt-get update...")
apt_get(['update'])
print("sudo pip install tox")
subprocess.check_call(['sudo', 'pip', 'install', 'tox'])
print("Installing packages...")
pkgs = ['python-tox']
pkgs = []
if XVFB:
pkgs.append('xvfb')
if INSTALL_PYQT:
pkgs += ['python3-pyqt5', 'python3-pyqt5.qtwebkit']
apt_get(['install'] + pkgs)
if pkgs:
print("apt-get update...")
apt_get(['update'])
print("apt-get install...")
apt_get(['install'] + pkgs)
check_setup('python3')
elif TRAVIS_OS == 'osx':
print("brew update...")