package
This commit is contained in:
parent
3eccd76e8c
commit
2eb71e6412
14 changed files with 0 additions and 0 deletions
|
@ -1,36 +0,0 @@
|
|||
import os
|
||||
|
||||
import arguments
|
||||
import distribution
|
||||
import subsystem
|
||||
|
||||
MAIN = 'x86_64'
|
||||
|
||||
ARCHITECTURES = {
|
||||
MAIN: (64, [subsystem.MAIN, 'clang64', 'mingw64', 'ucrt64']),
|
||||
'i686': (32, [subsystem.MAIN, 'clang32', 'mingw32']),
|
||||
}
|
||||
|
||||
|
||||
class Architecture:
|
||||
def __init__(self, repository, name):
|
||||
self.repository = repository
|
||||
self.name = name
|
||||
self.bits, subsystems = ARCHITECTURES[self.name]
|
||||
self.distribution = distribution.Distribution(self)
|
||||
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 __iter__(self):
|
||||
return self.subsystems.values().__iter__()
|
||||
|
||||
def __str__(self):
|
||||
lines = [
|
||||
f' Name: {self.name}',
|
||||
f' Bits: {self.bits}',
|
||||
f'Subsystems: {subsystem.name for subsystem in self}',
|
||||
]
|
||||
return os.linesep.join(lines)
|
Loading…
Add table
Add a link
Reference in a new issue