From 1857f0e1b003b04ee8fe632e705e8a9f79c8955b Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sun, 10 Oct 2021 18:07:20 +0200 Subject: [PATCH] architecture/subsystems --- architecture.py | 8 +++++++- msys.py | 12 ------------ 2 files changed, 7 insertions(+), 13 deletions(-) diff --git a/architecture.py b/architecture.py index c8565fe..7323109 100644 --- a/architecture.py +++ b/architecture.py @@ -1,5 +1,6 @@ import os +import arguments import distribution import subsystem @@ -12,11 +13,16 @@ class Architecture: self.name = name self.bits = bits self.distribution = distribution.Distribution(self) - self.subsystems = {s: subsystem.SubSystem(self, s) for s in subsystems} + self.subsystems = {s: subsystem.SubSystem(self, s) + for s in [f if f == subsystem.MAIN + else f'{f}{self.bits}' + for f in arguments.subsystems] + if s in subsystems} def __str__(self): lines = [ f'Name: {self.name}', + f'Bits: {self.bits}', ] return os.linesep.join(lines) diff --git a/msys.py b/msys.py index a01b57f..8199705 100644 --- a/msys.py +++ b/msys.py @@ -16,15 +16,3 @@ ARCHITECTURES_SUBSYSTEMS = { 'i686': [SUBSYSTEM, 'clang32', 'mingw32'], } SUBSYSTEMS = [SUBSYSTEM, 'clang', 'mingw', 'ucrt'] - - -def get_subsystems(architecture, families): - list = [] - for family in families: - if family == SUBSYSTEM: - subsystem = family - else: - subsystem = f'{family}{architecture.bits}' - if subsystem in ARCHITECTURES_SUBSYSTEMS[architecture.name]: - list.append(subsystem) - return list