Skip to content

Instantly share code, notes, and snippets.

@lighth7015
Created February 18, 2020 05:36
Show Gist options
  • Save lighth7015/770751337ceb78bd6d4f00c81fbf5148 to your computer and use it in GitHub Desktop.
Save lighth7015/770751337ceb78bd6d4f00c81fbf5148 to your computer and use it in GitHub Desktop.
waf runtim error
My code here

Setting top to                           : directory-it-doesnt-matter
Setting out to                           : directory-it-doesnt-matter
Traceback (most recent call last):
  File "/lib/python3.8/site-packages/waf/waflib/Scripting.py", line 159, in waf_entry_point
    run_commands()
  File "/lib/python3.8/site-packages/waf/waflib/Scripting.py", line 255, in run_commands
    ctx = run_command(cmd_name)
  File "/lib/python3.8/site-packages/waf/waflib/Scripting.py", line 239, in run_command
    ctx.execute()
  File "/lib/python3.8/site-packages/waf/waflib/Configure.py", line 317, in fun
    return f(*k, **kw)
  File "directory-it-doesnt-matter/wscript", line 31, in execute
    fn()
  File "/lib/python3.8/site-packages/waf/waflib/Configure.py", line 159, in execute
    super(ConfigurationContext, self).execute()
TypeError: super(type, obj): obj must be an instance or subtype of type
#!/usr/bin/env python3
# encoding: utf-8
from waflib import Build
from waflib.Configure import conf, ConfigurationContext
VERSION='0.0.1'
APPNAME='SDK'
top = '.'
_wrapped = ConfigurationContext.execute
@conf
def execute(self):
setattr( ConfigurationContext, _wrapped.__name__, _wrapped )
setattr( Build.BuildContext, _wrapped.__name__, _wrapped )
print( "My code here." )
fn = types.MethodType( _wrapped, self )
fn()
def options(opt):
opt.load('compiler_c gnu_dirs')
def configure(conf):
conf.load('compiler_c gnu_dirs')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment