From 9eca7ae55615cd4c57007e2daa8c3ad300014912 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Sun, 16 Aug 2015 11:13:24 +0200 Subject: [PATCH] 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. --- .appveyor.yml | 1 - scripts/dev/ci_install.py | 10 ++++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/.appveyor.yml b/.appveyor.yml index 1e78e0b9f..bebd3c0f2 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -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 diff --git a/scripts/dev/ci_install.py b/scripts/dev/ci_install.py index a891a6105..d516945fd 100644 --- a/scripts/dev/ci_install.py +++ b/scripts/dev/ci_install.py @@ -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'])