diff options
author | William Deegan <bill@baddogconsulting.com> | 2016-05-15 22:16:34 (GMT) |
---|---|---|
committer | William Deegan <bill@baddogconsulting.com> | 2016-05-15 22:16:34 (GMT) |
commit | fd9c768bf1b749a15d56481a49f7d60dd22a7ef6 (patch) | |
tree | af104a4ce467eee9a55f9f6d0effa5023d442e88 /src/script | |
parent | 59543b3ca4070ba5b35c055780a244a29beadd8a (diff) | |
download | SCons-fd9c768bf1b749a15d56481a49f7d60dd22a7ef6.zip SCons-fd9c768bf1b749a15d56481a49f7d60dd22a7ef6.tar.gz SCons-fd9c768bf1b749a15d56481a49f7d60dd22a7ef6.tar.bz2 |
revert some py3 changes which fail no py2 on windows and any platform/python without dbm module installed. Revisit py3 issues after we get py2 working again
Diffstat (limited to 'src/script')
-rw-r--r-- | src/script/sconsign.py | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/src/script/sconsign.py b/src/script/sconsign.py index 6f49858..e046a2c 100644 --- a/src/script/sconsign.py +++ b/src/script/sconsign.py @@ -187,7 +187,9 @@ sys.path = libs + sys.path import SCons.compat import whichdb -import dbm + +# was added for py3, but breaks py2 on windows.. +#import dbm import time import pickle import imp @@ -205,8 +207,14 @@ def my_whichdb(filename): pass return _orig_whichdb(filename) + +# Should work on python2 _orig_whichdb = whichdb.whichdb -dbm.whichdb = my_whichdb +whichdb.whichdb = my_whichdb + +# was changed for python3 +#_orig_whichdb = whichdb.whichdb +#dbm.whichdb = my_whichdb def my_import(mname): if '.' in mname: @@ -523,7 +531,9 @@ if Do_Call: Do_Call(a) else: for a in args: - dbm_name = dbm.whichdb(a) + # changed for py3 compat, broke py2 on windows + # dbm_name = dbm.whichdb(a) + dbm_name = whichdb.whichdb(a) if dbm_name: Map_Module = {'SCons.dblite' : 'dblite'} if dbm_name != "SCons.dblite": |