diff --git a/waflib/Context.py b/waflib/Context.py index 77f310e..2c00cfc 100644 --- a/waflib/Context.py +++ b/waflib/Context.py @@ -2,7 +2,7 @@ # encoding: utf-8 # WARNING! Do not edit! https://waf.io/book/index.html#_obtaining_the_waf_file -import os,re,imp,sys +import os,re,types,sys from waflib import Utils,Errors,Logs import waflib.Node HEXVERSION=0x1090300 @@ -338,7 +338,7 @@ def load_module(path,encoding=None): return cache_modules[path] except KeyError: pass - module=imp.new_module(WSCRIPT_FILE) + module=types.ModuleType(WSCRIPT_FILE) try: code=Utils.readf(path,m='r',encoding=encoding) except EnvironmentError: diff --git a/wscript b/wscript index fd4dcea..bdac47b 100644 --- a/wscript +++ b/wscript @@ -43,13 +43,13 @@ def options(opt): opt.load('compiler_c') opt.load('compiler_cxx') - opt.add_option('--with-flavors', type = 'string', action='callback', + opt.add_option('--with-flavors', type = 'str', action='callback', callback=option_list_cb, dest = 'flavors', help = "a list of flavors to build (%s, all-linux (except dispmanx-glesv2), all-win32)" % FLAVORS_STR) opt.parser.set_default('flavors', []) - opt.parser.add_option('--version-suffix', type='string', action='store', dest='versionsuffix', + opt.parser.add_option('--version-suffix', type='str', action='store', dest='versionsuffix', default='', help='add a suffix to the version number') opt.add_option('--no-debug', action='store_false', dest = 'debug',