diff --git a/src/oebuild/local_conf.py b/src/oebuild/local_conf.py index 8b05595dd1af112a8b0a2f93893299c8477abdda..269d826ca88ec242caa5caab3f62bc38c534b5d1 100644 --- a/src/oebuild/local_conf.py +++ b/src/oebuild/local_conf.py @@ -114,13 +114,6 @@ class LocalConf: new_str=f'MACHINE = "{parse_compile.machine}"', content=content) - # replace platform - content = match_and_replace( - pre="OPENEULER_PLATFORM ", - new_str=f'OPENEULER_PLATFORM = "{parse_compile.platform}"', - content=content - ) - # replace toolchain if parse_compile.toolchain_dir is not None: if parse_compile.build_in == oebuild_const.BUILD_IN_DOCKER: diff --git a/src/oebuild/parse_compile.py b/src/oebuild/parse_compile.py index e943918a4f4290e78d45230e0c9cc79e378b654a..cde558027509c373b431a39d9cd888e3e32e99f7 100644 --- a/src/oebuild/parse_compile.py +++ b/src/oebuild/parse_compile.py @@ -107,7 +107,6 @@ class ParseCompile: self.compile = Compile( build_in=oebuild_const.BUILD_IN_DOCKER if 'build_in' not in data else data['build_in'], - platform=data['platform'], machine=data['machine'], toolchain_type=data['toolchain_type'], toolchain_dir=None if 'toolchain_dir' not in data else data['toolchain_dir'], @@ -129,13 +128,6 @@ class ParseCompile: ''' return self.compile.build_in - @property - def platform(self): - ''' - return attr of platform - ''' - return self.compile.platform - @property def machine(self): ''' @@ -257,7 +249,6 @@ class ParseCompile: ''' keys = { - "platform": "the key platform is None", "machine": "the key machine is None", "toolchain_type": "the key toolchain_type is None" } diff --git a/src/oebuild/parse_template.py b/src/oebuild/parse_template.py index 1eaecf84d5601c8cf49d8f7561711a24ffc90fe0..d93ffc2a045844f7d52b8721f9240d885ba45179 100644 --- a/src/oebuild/parse_template.py +++ b/src/oebuild/parse_template.py @@ -55,8 +55,6 @@ class PlatformTemplate(Template): ''' the object will be parsed by platform config ''' - platform: LiteralScalarString - machine: LiteralScalarString toolchain_type: LiteralScalarString @@ -127,9 +125,9 @@ class ParseTemplate: config_type = data['type'] config_name = os.path.basename(config_dir) + platform = os.path.splitext(config_name)[0].strip("\n") if config_type == oebuild_const.PLATFORM: self.platform_template = PlatformTemplate( - platform=LiteralScalarString(os.path.splitext(config_name)[0]), machine=data['machine'], toolchain_type=data['toolchain_type'], repos=repo_dict, @@ -143,8 +141,8 @@ class ParseTemplate: support_arch = [] if 'support' in data: support_arch = data['support'].split('|') - if self.platform_template.platform not in support_arch: - raise FeatureNotSupport(f'your arch is {self.platform_template.platform}, \ + if platform not in support_arch: + raise FeatureNotSupport(f'your arch is {platform}, \ the feature is not supported, please check your \ application support archs') @@ -237,7 +235,6 @@ class ParseTemplate: compile_conf = {} compile_conf['build_in'] = build_in - compile_conf['platform'] = self.platform_template.platform compile_conf['machine'] = self.platform_template.machine compile_conf['toolchain_type'] = self.platform_template.toolchain_type