[PyQt] pyqtdeploycli doesn't find 32-bit python3.5 install

Kyle Altendorf sda at fstab.net
Fri Jul 29 18:06:07 BST 2016


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:
-------------- next part --------------
A non-text attachment was scrubbed...
Name: python-32bit.patch
Type: text/x-diff
Size: 1023 bytes
Desc: not available
URL: <https://www.riverbankcomputing.com/pipermail/pyqt/attachments/20160729/cc8c7f51/attachment.patch>


More information about the PyQt mailing list