mirror of
https://github.com/godotengine/godot.git
synced 2025-02-16 15:50:45 +00:00
Fix SConstruct check for config.is_enabled()
This commit is contained in:
parent
e36fb95c50
commit
d5caf71c3f
13
SConstruct
13
SConstruct
@ -192,13 +192,12 @@ for x in module_list:
|
|||||||
module_enabled = True
|
module_enabled = True
|
||||||
tmppath = "./modules/" + x
|
tmppath = "./modules/" + x
|
||||||
sys.path.append(tmppath)
|
sys.path.append(tmppath)
|
||||||
try:
|
import config
|
||||||
import config
|
enabled_attr = getattr(config, "is_enabled", None)
|
||||||
if (not config.is_enabled()):
|
if (callable(enabled_attr) and not config.is_enabled()):
|
||||||
module_enabled = False
|
module_enabled = False
|
||||||
except:
|
|
||||||
pass
|
|
||||||
sys.path.remove(tmppath)
|
sys.path.remove(tmppath)
|
||||||
|
sys.modules.pop('config')
|
||||||
opts.Add(BoolVariable('module_' + x + '_enabled', "Enable module '%s'" % (x, ), module_enabled))
|
opts.Add(BoolVariable('module_' + x + '_enabled', "Enable module '%s'" % (x, ), module_enabled))
|
||||||
|
|
||||||
opts.Update(env_base) # update environment
|
opts.Update(env_base) # update environment
|
||||||
@ -246,7 +245,7 @@ if selected_platform in platform_list:
|
|||||||
env = detect.create(env_base)
|
env = detect.create(env_base)
|
||||||
else:
|
else:
|
||||||
env = env_base.Clone()
|
env = env_base.Clone()
|
||||||
|
|
||||||
if env['dev']:
|
if env['dev']:
|
||||||
env["warnings"] = "all"
|
env["warnings"] = "all"
|
||||||
env['verbose'] = True
|
env['verbose'] = True
|
||||||
|
Loading…
Reference in New Issue
Block a user