path/subsystem

This commit is contained in:
Marc Beninca 2021-10-10 16:42:35 +02:00 committed by Marc Beninca
parent e9e6994c62
commit bb36a79cbf
4 changed files with 13 additions and 15 deletions

View file

@ -1,5 +1,6 @@
import os
CRT = 'mingw'
MAIN = 'msys'
FAMILIES = [MAIN, 'clang', 'mingw', 'ucrt']
@ -9,10 +10,19 @@ class SubSystem:
def __init__(self, architecture, name):
self.architecture = architecture
self.name = name
# 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)
def __str__(self):
lines = [
f'Architecture: {self.architecture.name}',
f' Name: {self.name}',
f' Path: {self.path}',
]
return os.linesep.join(lines)