diff options
author | William Deegan <bill@baddogconsulting.com> | 2017-05-09 13:28:36 (GMT) |
---|---|---|
committer | William Deegan <bill@baddogconsulting.com> | 2017-05-09 13:28:36 (GMT) |
commit | 2a2f26cd83da8e63ead93999e7a08502f222ffd8 (patch) | |
tree | 70b3ee667a0602c7bcbc3bdd5f3a3f5eeb04f89f /test/SConsignFile/use-dbm.py | |
parent | fa879a1ea3230176d3bfa64212883dd29d6358b3 (diff) | |
parent | 9bac6ca4c581925ed96f8b0d7881607f6bc03883 (diff) | |
download | SCons-2a2f26cd83da8e63ead93999e7a08502f222ffd8.zip SCons-2a2f26cd83da8e63ead93999e7a08502f222ffd8.tar.gz SCons-2a2f26cd83da8e63ead93999e7a08502f222ffd8.tar.bz2 |
Merged in bdbaddog/scons (pull request #460)
PY2/3 changes.
Diffstat (limited to 'test/SConsignFile/use-dbm.py')
-rw-r--r-- | test/SConsignFile/use-dbm.py | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/test/SConsignFile/use-dbm.py b/test/SConsignFile/use-dbm.py index 90983b3..129d5b6 100644 --- a/test/SConsignFile/use-dbm.py +++ b/test/SConsignFile/use-dbm.py @@ -34,10 +34,16 @@ _python_ = TestSCons._python_ test = TestSCons.TestSCons() + try: import dbm.ndbm + use_db = 'dbm.ndbm' except ImportError: - test.skip_test('No dbm in this version of Python; skipping test.\n') + try: + import dbm + use_db = 'dbm' + except ImportError: + test.skip_test('No dbm.ndbm in this version of Python; skipping test.\n') test.subdir('subdir') @@ -53,8 +59,8 @@ sys.exit(0) # test.write('SConstruct', """ import sys -import dbm -SConsignFile('.sconsign', dbm) +import %(use_db)s +SConsignFile('.sconsign', %(use_db)s) B = Builder(action = '%(_python_)s build.py $TARGETS $SOURCES') env = Environment(BUILDERS = { 'B' : B }) env.B(target = 'f1.out', source = 'f1.in') |