diff --git a/.appveyor.yml b/.appveyor.yml index 0f970d98b..1f91531ac 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -7,6 +7,9 @@ environment: PYTHONUNBUFFERED: 1 matrix: - TESTENV: py34 + - TESTENV: py35-pyqt56 + - TESTENV: py35-pyqt571 + - TESTENV: py36-pyqt571 - TESTENV: unittests-frozen - TESTENV: pylint diff --git a/scripts/dev/ci/appveyor_install.py b/scripts/dev/ci/appveyor_install.py index 2c04304d5..ad63ee3a4 100644 --- a/scripts/dev/ci/appveyor_install.py +++ b/scripts/dev/ci/appveyor_install.py @@ -28,6 +28,7 @@ CI machines. from __future__ import print_function +import os import time import subprocess import urllib @@ -44,22 +45,26 @@ def pip_install(pkg): pkg]) -print("Getting PyQt5...") -qt_version = '5.5.1' -pyqt_version = '5.5.1' -pyqt_url = ('https://www.qutebrowser.org/pyqt/' - 'PyQt5-{}-gpl-Py3.4-Qt{}-x32.exe'.format( - pyqt_version, qt_version)) +using_pypi = '-pyqt' in os.environ['TESTENV'] -try: - urllib.urlretrieve(pyqt_url, r'C:\install-PyQt5.exe') -except (OSError, IOError): - print("Downloading PyQt failed, trying again in 10 seconds...") - time.sleep(10) - urllib.urlretrieve(pyqt_url, r'C:\install-PyQt5.exe') -print("Installing PyQt5...") -subprocess.check_call([r'C:\install-PyQt5.exe', '/S']) +if not using_pypi: + print("Getting PyQt5...") + qt_version = '5.5.1' + pyqt_version = '5.5.1' + pyqt_url = ('https://www.qutebrowser.org/pyqt/' + 'PyQt5-{}-gpl-Py3.4-Qt{}-x32.exe'.format( + pyqt_version, qt_version)) + + try: + urllib.urlretrieve(pyqt_url, r'C:\install-PyQt5.exe') + except (OSError, IOError): + print("Downloading PyQt failed, trying again in 10 seconds...") + time.sleep(10) + urllib.urlretrieve(pyqt_url, r'C:\install-PyQt5.exe') + + print("Installing PyQt5...") + subprocess.check_call([r'C:\install-PyQt5.exe', '/S']) print("Installing tox") pip_install('pip') @@ -68,5 +73,10 @@ pip_install(r'-rmisc\requirements\requirements-tox.txt') print("Linking Python...") with open(r'C:\Windows\system32\python3.bat', 'w') as f: f.write(r'@C:\Python34\python %*') +with open(r'C:\Windows\system32\python3.5.bat', 'w') as f: + f.write(r'@C:\Python35\python %*') +with open(r'C:\Windows\system32\python3.6.bat', 'w') as f: + f.write(r'@C:\Python36\python %*') -check_setup(r'C:\Python34\python') +if not using_pypi: + check_setup(r'C:\Python34\python')