Changeset: 35c22cdb4de1 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=35c22cdb4de1
Modified Files:
testing/Mtest.py.in
Branch: Aug2018
Log Message:
Fixing 32 bit pyapi testing.
Which registry key to look up depends on who's asking.
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
@@ -2994,17 +2994,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
@@ -3014,12 +3019,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