path/subsystem
This commit is contained in:
parent
e9e6994c62
commit
bb36a79cbf
4 changed files with 13 additions and 15 deletions
10
subsystem.py
10
subsystem.py
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue