Commented out the add_x_from_string methods since we don't need to worry about it. Also, changed the way architecture is set. Todd wanted to have users be able to input just frontend and/or backend in the architecture spec. This will be able to parse those inputs.
This commit is contained in:
parent
01a36ab333
commit
3a281b2399
@ -465,7 +465,7 @@ def _set_architecture(self, architecture):
|
|||||||
if '-' in architecture:
|
if '-' in architecture:
|
||||||
os, target = architecture.split('-')
|
os, target = architecture.split('-')
|
||||||
|
|
||||||
elif architecture == 'frontend' or architecture == 'backend':
|
elif architecture in ['frontend','backend','fe','be']:
|
||||||
os = architecture
|
os = architecture
|
||||||
target = architecture
|
target = architecture
|
||||||
else:
|
else:
|
||||||
@ -1302,28 +1302,17 @@ def _autospec(self, spec_like):
|
|||||||
except SpecError:
|
except SpecError:
|
||||||
return parse_anonymous_spec(spec_like, self.name)
|
return parse_anonymous_spec(spec_like, self.name)
|
||||||
|
|
||||||
def _is_valid_platform(self, platform, platform_list):
|
#def add_target_from_string(self, target):
|
||||||
if platform in platform_list:
|
# if target is None:
|
||||||
return True
|
# self.architecture.target = self.architecture.platform.target('default_target')
|
||||||
return False
|
# else:
|
||||||
|
# self.architecture.target = self.architecture.platform.target(target)
|
||||||
|
|
||||||
def _is_valid_target(self, target, platform):
|
#def add_operating_system_from_string(self, os):
|
||||||
return target in platform.targets
|
# if os is None:
|
||||||
|
# self.architecture.platform_os = self.architecture.platform.operating_system('default_os')
|
||||||
def _is_valid_os(self, os_string, platform):
|
# else:
|
||||||
return os_string in platform.operating_sys
|
# self.architecture.platform_os = self.architecture.platform.operating_system(os)
|
||||||
|
|
||||||
def add_target_from_string(self, target):
|
|
||||||
if target is None:
|
|
||||||
self.architecture.target = self.architecture.platform.target('default_target')
|
|
||||||
else:
|
|
||||||
self.architecture.target = self.architecture.platform.target(target)
|
|
||||||
|
|
||||||
def add_operating_system_from_string(self, os):
|
|
||||||
if os is None:
|
|
||||||
self.architecture.platform_os = self.architecture.platform.operating_system('default_os')
|
|
||||||
else:
|
|
||||||
self.architecture.platform_os = self.architecture.platform.operating_system(os)
|
|
||||||
|
|
||||||
|
|
||||||
def satisfies(self, other, deps=True, strict=False):
|
def satisfies(self, other, deps=True, strict=False):
|
||||||
|
Loading…
Reference in New Issue
Block a user