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') check_setup(r'C:\Python34\python')
elif TRAVIS_OS == 'linux': elif TRAVIS_OS == 'linux':
print("apt-get update...") print("sudo pip install tox")
apt_get(['update']) subprocess.check_call(['sudo', 'pip', 'install', 'tox'])
print("Installing packages...") print("Installing packages...")
pkgs = ['python-tox'] pkgs = []
if XVFB: if XVFB:
pkgs.append('xvfb') pkgs.append('xvfb')
if INSTALL_PYQT: if INSTALL_PYQT:
pkgs += ['python3-pyqt5', 'python3-pyqt5.qtwebkit'] 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') check_setup('python3')
elif TRAVIS_OS == 'osx': elif TRAVIS_OS == 'osx':
print("brew update...") print("brew update...")