Changeset: 65b62e16ef38 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=65b62e16ef38
Modified Files:
        testing/Mtest.py.in
Branch: Apr2019
Log Message:

Merge with Aug2018 branch.


diffs (49 lines):

diff --git a/testing/Mtest.py.in b/testing/Mtest.py.in
--- a/testing/Mtest.py.in
+++ b/testing/Mtest.py.in
@@ -3009,17 +3009,22 @@ def DoIt(env, SERVER, CALL, TST, EXT, PR
                 Srvr.extend(['--set', 'embedded_r=yes'])
 
             savepath = None
-            savepypath = None
-            savepyhome = None
+            savepypath = os.environ.get('PYTHONPATH')
+            savepyhome = os.environ.get('PYTHONHOME')
             if (COND != None and "HAVE_LIBPY3" in COND) and 
CONDITIONALS['HAVE_LIBPY3']:
                 # enable Python 3 integration in server
                 if winreg is not None:
+                    if env['TST_BITS'] == '32bit':
+                        if sys.maxsize > 2**32:
+                            regkey = 
r'SOFTWARE\Wow6432Node\Python\PythonCore\3.7-32\InstallPath'
+                        else:
+                            regkey = 
r'SOFTWARE\Python\PythonCore\3.7-32\InstallPath'
+                    else:
+                        regkey = r'SOFTWARE\Python\PythonCore\3.7\InstallPath'
                     try:
-                        with winreg.OpenKey(winreg.HKEY_LOCAL_MACHINE, 
r'SOFTWARE\Python\PythonCore\3.7\InstallPath') as key:
+                        with winreg.OpenKey(winreg.HKEY_LOCAL_MACHINE, regkey) 
as key:
                             instpath = winreg.QueryValue(key, None)
-                            savepyhome = os.environ.get('PYTHONHOME')
                             os.environ['PYTHONHOME'] = instpath
-                            savepypath = os.environ.get('PYTHONPATH')
                             os.environ['PYTHONPATH'] = instpath + 'Lib'
                             savepath = os.environ['PATH']
                             os.environ['PATH'] = instpath.rstrip('\\') + 
os.pathsep + savepath
@@ -3029,12 +3034,14 @@ def DoIt(env, SERVER, CALL, TST, EXT, PR
             elif (not all_tests or (COND != None and "HAVE_LIBPY" in COND)) 
and CONDITIONALS['HAVE_LIBPY']:
                 # enable Python integration in server
                 if winreg is not None:
+                    if env['TST_BITS'] == '32bit' and sys.maxsize > 2**32:
+                        regkey = 
r'SOFTWARE\Wow6432Node\Python\PythonCore\2.7\InstallPath'
+                    else:
+                        regkey = r'SOFTWARE\Python\PythonCore\2.7\InstallPath'
                     try:
-                        with winreg.OpenKey(winreg.HKEY_LOCAL_MACHINE, 
r'SOFTWARE\Python\PythonCore\2.7\InstallPath') as key:
+                        with winreg.OpenKey(winreg.HKEY_LOCAL_MACHINE, regkey) 
as key:
                             instpath = winreg.QueryValue(key, None)
-                            savepyhome = os.environ.get('PYTHONHOME')
                             os.environ['PYTHONHOME'] = instpath
-                            savepypath = os.environ.get('PYTHONPATH')
                             os.environ['PYTHONPATH'] = instpath + 'Lib'
                             savepath = os.environ['PATH']
                             os.environ['PATH'] = instpath.rstrip('\\') + 
os.pathsep + savepath
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to