architectures
This commit is contained in:
parent
6738c17522
commit
7800bb9175
2 changed files with 8 additions and 16 deletions
|
@ -4,14 +4,17 @@ import arguments
|
||||||
import distribution
|
import distribution
|
||||||
import subsystem
|
import subsystem
|
||||||
|
|
||||||
X86 = 'x86_64'
|
ARCHITECTURES = {
|
||||||
I86 = 'i686'
|
'x86_64': (64, [subsystem.MAIN, 'clang64', 'mingw64', 'ucrt64']),
|
||||||
|
'i686' : (32, [subsystem.MAIN, 'clang32', 'mingw32']),
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
class Architecture:
|
class Architecture:
|
||||||
def __init__(self, name, bits, subsystems):
|
def __init__(self, repository, name):
|
||||||
|
self.repository = repository
|
||||||
self.name = name
|
self.name = name
|
||||||
self.bits = bits
|
self.bits, subsystems = ARCHITECTURES[self.name]
|
||||||
self.distribution = distribution.Distribution(self)
|
self.distribution = distribution.Distribution(self)
|
||||||
self.subsystems = {s: subsystem.SubSystem(self, s)
|
self.subsystems = {s: subsystem.SubSystem(self, s)
|
||||||
for s in [f if f == subsystem.MAIN
|
for s in [f if f == subsystem.MAIN
|
||||||
|
@ -25,14 +28,3 @@ class Architecture:
|
||||||
f'Bits: {self.bits}',
|
f'Bits: {self.bits}',
|
||||||
]
|
]
|
||||||
return os.linesep.join(lines)
|
return os.linesep.join(lines)
|
||||||
|
|
||||||
|
|
||||||
x86 = Architecture(X86, 64, [subsystem.MAIN,
|
|
||||||
'clang64', 'mingw64', 'ucrt64'])
|
|
||||||
i86 = Architecture(I86, 32, [subsystem.MAIN,
|
|
||||||
'clang32', 'mingw32'])
|
|
||||||
|
|
||||||
ARCHITECTURES = {
|
|
||||||
X86: x86,
|
|
||||||
I86: i86,
|
|
||||||
}
|
|
||||||
|
|
|
@ -7,7 +7,7 @@ import arguments
|
||||||
class Repository:
|
class Repository:
|
||||||
def __init__(self, location):
|
def __init__(self, location):
|
||||||
self.location = location
|
self.location = location
|
||||||
self.architectures = [architecture.ARCHITECTURES[a]
|
self.architectures = [architecture.Architecture(self, a)
|
||||||
for a in arguments.architectures]
|
for a in arguments.architectures]
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
|
|
Loading…
Reference in a new issue