2021-10-10 13:22:02 +00:00
|
|
|
import os
|
|
|
|
|
2021-10-10 14:42:35 +00:00
|
|
|
CRT = 'mingw'
|
2021-10-10 13:22:02 +00:00
|
|
|
MAIN = 'msys'
|
|
|
|
|
2021-10-10 13:44:03 +00:00
|
|
|
FAMILIES = [MAIN, 'clang', 'mingw', 'ucrt']
|
|
|
|
|
2021-10-10 13:22:02 +00:00
|
|
|
|
|
|
|
class SubSystem:
|
2021-10-10 13:46:37 +00:00
|
|
|
def __init__(self, architecture, name):
|
2021-10-10 13:22:02 +00:00
|
|
|
self.architecture = architecture
|
|
|
|
self.name = name
|
2021-10-10 14:42:35 +00:00
|
|
|
# path
|
|
|
|
list = []
|
|
|
|
if self.name != MAIN:
|
|
|
|
list.append(CRT)
|
|
|
|
list.append(self.name)
|
|
|
|
if self.name == MAIN:
|
|
|
|
list.append(self.architecture.name)
|
|
|
|
self.path = os.sep.join(list)
|
2021-10-10 13:22:02 +00:00
|
|
|
|
|
|
|
def __str__(self):
|
|
|
|
lines = [
|
|
|
|
f'Architecture: {self.architecture.name}',
|
|
|
|
f' Name: {self.name}',
|
2021-10-10 14:42:35 +00:00
|
|
|
f' Path: {self.path}',
|
2021-10-10 13:22:02 +00:00
|
|
|
]
|
|
|
|
return os.linesep.join(lines)
|