From d094a495cc4855b3aec7253b21fb434224235398 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Tue, 6 Oct 2015 06:20:31 +0200 Subject: [PATCH] Avoid apt-get on Travis if possible. This should speed up builds as no apt-get update is needed. --- scripts/dev/ci_install.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/scripts/dev/ci_install.py b/scripts/dev/ci_install.py index 49229890e..2944b385d 100644 --- a/scripts/dev/ci_install.py +++ b/scripts/dev/ci_install.py @@ -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...")