[prev in list] [next in list] [prev in thread] [next in thread]
List: pykde
Subject: [PyQt] pyqtdeploycli doesn't find 32-bit python3.5 install
From: Kyle Altendorf <sda () fstab ! net>
Date: 2016-07-29 17:06:07
Message-ID: f89e42a338e2181046acb80f11e8c59e () eumx ! net
[Download RAW message or body]
I am testing out pyqtdeploy with latest 5.7 and found that when trying
to 'install' the Python 3.5-32 into my sysroot it was not found.
Consider the patch below and attached.
Cheers,
-kyle
diff -r 12ef76e33e19 pyqtdeploy/python/windows.py
--- a/pyqtdeploy/python/windows.py Tue Jun 14 15:02:22 2016 +0100
+++ b/pyqtdeploy/python/windows.py Fri Jul 29 13:04:39 2016 -0400
@@ -24,6 +24,8 @@
# POSSIBILITY OF SUCH DAMAGE.
+import itertools
+
from ..user_exception import UserException
@@ -35,10 +37,15 @@
from winreg import HKEY_CURRENT_USER, HKEY_LOCAL_MACHINE,
QueryValue
- sub_key =
'Software\\Python\\PythonCore\\{0}.{1}\\InstallPath'.format(
+ sub_key_64 =
'Software\\Python\\PythonCore\\{0}.{1}\\InstallPath'.format(
+ major, minor)
+ sub_key_32 =
'Software\\WOW6432Node\\Python\\PythonCore\\{0}.{1}-32\\InstallPath'.format(
major, minor)
- for key in (HKEY_CURRENT_USER, HKEY_LOCAL_MACHINE):
+ keys = (HKEY_CURRENT_USER, HKEY_LOCAL_MACHINE)
+ sub_keys = (sub_key_64, sub_key_32)
+
+ for key, sub_key in itertools.product(keys, sub_keys):
try:
install_path = QueryValue(key, sub_key)
except OSError:
["python-32bit.patch" (text/x-diff)]
diff -r 12ef76e33e19 pyqtdeploy/python/windows.py
--- a/pyqtdeploy/python/windows.py Tue Jun 14 15:02:22 2016 +0100
+++ b/pyqtdeploy/python/windows.py Fri Jul 29 13:04:39 2016 -0400
@@ -24,6 +24,8 @@
# POSSIBILITY OF SUCH DAMAGE.
+import itertools
+
from ..user_exception import UserException
@@ -35,10 +37,15 @@
from winreg import HKEY_CURRENT_USER, HKEY_LOCAL_MACHINE, QueryValue
- sub_key = 'Software\\Python\\PythonCore\\{0}.{1}\\InstallPath'.format(
+ sub_key_64 = 'Software\\Python\\PythonCore\\{0}.{1}\\InstallPath'.format(
+ major, minor)
+ sub_key_32 = 'Software\\WOW6432Node\\Python\\PythonCore\\{0}.{1}-32\\InstallPath'.format(
major, minor)
- for key in (HKEY_CURRENT_USER, HKEY_LOCAL_MACHINE):
+ keys = (HKEY_CURRENT_USER, HKEY_LOCAL_MACHINE)
+ sub_keys = (sub_key_64, sub_key_32)
+
+ for key, sub_key in itertools.product(keys, sub_keys):
try:
install_path = QueryValue(key, sub_key)
except OSError:
[Attachment #4 (text/plain)]
_______________________________________________
PyQt mailing list PyQt@riverbankcomputing.com
https://www.riverbankcomputing.com/mailman/listinfo/pyqt
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic