appveyor: Fix Python path in registry.
This makes PyQt pick up C:\Python34 correctly so we can use the newer AppVeyor image again. See https://github.com/appveyor/ci/issues/363.
This commit is contained in:
parent
952893d984
commit
9eca7ae556
@ -3,7 +3,6 @@ version: '{branch}-{build}'
|
||||
cache:
|
||||
- C:\projects\qutebrowser\.cache
|
||||
build: off
|
||||
os: Previous Windows Server 2012 R2
|
||||
environment:
|
||||
PYTHON: 'C:\Python34'
|
||||
PYTHONUNBUFFERED: 1
|
||||
|
@ -33,6 +33,10 @@ import sys
|
||||
import subprocess
|
||||
import urllib
|
||||
|
||||
try:
|
||||
import _winreg as winreg
|
||||
except ImportError:
|
||||
winreg = None
|
||||
|
||||
|
||||
def apt_get(args):
|
||||
@ -59,6 +63,12 @@ if 'APPVEYOR' in os.environ:
|
||||
'http://www.qutebrowser.org/pyqt/PyQt5-5.5-gpl-Py3.4-Qt5.5.0-x32.exe',
|
||||
r'C:\install-PyQt5.exe')
|
||||
|
||||
print("Fixing registry...")
|
||||
with winreg.OpenKey(winreg.HKEY_CURRENT_USER,
|
||||
r'Software\Python\PythonCore\3.4', 0,
|
||||
winreg.KEY_WRITE) as key:
|
||||
winreg.SetValue(key, 'InstallPath', winreg.REG_SZ, r'C:\Python34')
|
||||
|
||||
print("Installing PyQt5...")
|
||||
subprocess.check_call([r'C:\install-PyQt5.exe', '/S'])
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user