Try PyPI envs on Appveyor

This commit is contained in:
Florian Bruhin 2017-02-08 15:24:54 +01:00
parent 314ba53014
commit 4506575638
2 changed files with 28 additions and 15 deletions

View File

@ -7,6 +7,9 @@ environment:
PYTHONUNBUFFERED: 1
matrix:
- TESTENV: py34
- TESTENV: py35-pyqt56
- TESTENV: py35-pyqt571
- TESTENV: py36-pyqt571
- TESTENV: unittests-frozen
- TESTENV: pylint

View File

@ -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')