We do not use `_targets_env`, remove it.
This commit is contained in:
parent
5f01937d69
commit
f8f9ed5bce
|
@ -211,11 +211,6 @@ def extract_archive(archive_path, dest_dir, topdir=None, name=None):
|
||||||
class BuildEnv:
|
class BuildEnv:
|
||||||
build_targets = ['native', 'win32']
|
build_targets = ['native', 'win32']
|
||||||
|
|
||||||
_targets_env = {
|
|
||||||
'native' : {},
|
|
||||||
'win32' : {'wrapper': 'mingw32-env'}
|
|
||||||
}
|
|
||||||
|
|
||||||
def __init__(self, options, targetsDict):
|
def __init__(self, options, targetsDict):
|
||||||
self.source_dir = pj(options.working_dir, "SOURCE")
|
self.source_dir = pj(options.working_dir, "SOURCE")
|
||||||
build_dir = "BUILD_{target}_{libmod}".format(
|
build_dir = "BUILD_{target}_{libmod}".format(
|
||||||
|
@ -232,7 +227,6 @@ class BuildEnv:
|
||||||
os.makedirs(self.log_dir, exist_ok=True)
|
os.makedirs(self.log_dir, exist_ok=True)
|
||||||
os.makedirs(self.install_dir, exist_ok=True)
|
os.makedirs(self.install_dir, exist_ok=True)
|
||||||
self.detect_platform()
|
self.detect_platform()
|
||||||
self.setup_build_target(options.build_target)
|
|
||||||
self.ninja_command = self._detect_ninja()
|
self.ninja_command = self._detect_ninja()
|
||||||
if not self.ninja_command:
|
if not self.ninja_command:
|
||||||
sys.exit("ERROR: ninja command not found")
|
sys.exit("ERROR: ninja command not found")
|
||||||
|
@ -251,10 +245,6 @@ class BuildEnv:
|
||||||
if self.distname == 'Ubuntu':
|
if self.distname == 'Ubuntu':
|
||||||
self.distname = 'debian'
|
self.distname = 'debian'
|
||||||
|
|
||||||
def setup_build_target(self, build_target):
|
|
||||||
self.build_target = build_target
|
|
||||||
self.target_env = self._targets_env[self.build_target]
|
|
||||||
|
|
||||||
def finalize_setup(self):
|
def finalize_setup(self):
|
||||||
getattr(self, 'setup_{}'.format(self.build_target))()
|
getattr(self, 'setup_{}'.format(self.build_target))()
|
||||||
|
|
||||||
|
@ -957,7 +947,7 @@ class Builder:
|
||||||
self.buildEnv = buildEnv = BuildEnv(options, self.targets)
|
self.buildEnv = buildEnv = BuildEnv(options, self.targets)
|
||||||
if buildEnv.build_target != 'native':
|
if buildEnv.build_target != 'native':
|
||||||
self.nativeBuildEnv = BuildEnv(options, self.targets)
|
self.nativeBuildEnv = BuildEnv(options, self.targets)
|
||||||
self.nativeBuildEnv.setup_build_target('native')
|
self.nativeBuildEnv.build_target = 'native'
|
||||||
else:
|
else:
|
||||||
self.nativeBuildEnv = buildEnv
|
self.nativeBuildEnv = buildEnv
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue