Changeset: f46121b1d04f for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=f46121b1d04f
Modified Files:
testing/Mtest.py.in
Branch: Aug2018
Log Message:
Reset PYTHONHOME.
diffs (37 lines):
diff --git a/testing/Mtest.py.in b/testing/Mtest.py.in
--- a/testing/Mtest.py.in
+++ b/testing/Mtest.py.in
@@ -2995,12 +2995,14 @@ def DoIt(env, SERVER, CALL, TST, EXT, PR
savepath = None
savepypath = None
+ savepyhome = None
if (COND != None and "HAVE_LIBPY3" in COND) and
CONDITIONALS['HAVE_LIBPY3']:
# enable Python 3 integration in server
if winreg is not None:
try:
with winreg.OpenKey(winreg.HKEY_LOCAL_MACHINE,
r'SOFTWARE\Python\PythonCore\3.7\InstallPath') 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'
@@ -3015,6 +3017,7 @@ def DoIt(env, SERVER, CALL, TST, EXT, PR
try:
with winreg.OpenKey(winreg.HKEY_LOCAL_MACHINE,
r'SOFTWARE\Python\PythonCore\2.7\InstallPath') 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'
@@ -3035,6 +3038,10 @@ def DoIt(env, SERVER, CALL, TST, EXT, PR
os.environ['PYTHONPATH'] = savepypath
else:
del os.environ['PYTHONPATH']
+ if savepyhome:
+ os.environ['PYTHONHOME'] = savepyhome
+ else:
+ del os.environ['PYTHONHOME']
ln="dummy"
while 0 < len(ln) and not ln.startswith('Ready.'):
ln=pSrvr.stdout.readline()
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list