appveyor_install: Don't install old PyQt if unneeded

This commit is contained in:
Florian Bruhin 2017-03-30 21:58:33 +02:00
parent c28c428051
commit fd276dabc7

View File

@ -28,6 +28,7 @@ CI machines.
from __future__ import print_function
import os
import time
import subprocess
import urllib
@ -44,23 +45,6 @@ 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))
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')
pip_install(r'-rmisc\requirements\requirements-tox.txt')
@ -69,4 +53,23 @@ print("Linking Python...")
with open(r'C:\Windows\system32\python3.bat', 'w') as f:
f.write(r'@C:\Python34\python %*')
check_setup(r'C:\Python34\python')
if '-pyqt' not in os.environ['TESTENV']:
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'])
check_setup(r'C:\Python34\python')