mrmp/msys.py

32 lines
780 B
Python
Raw Normal View History

2021-10-10 01:00:43 +00:00
ARCHIVE = '.tar.xz'
2021-10-10 01:55:22 +00:00
ARCHITECTURES = ['x86_64', 'i686']
2021-10-10 02:19:14 +00:00
ARCHITECTURES_BITS = {
'x86_64': 64,
'i686': 32,
}
2021-10-10 01:57:52 +00:00
CATALOG = '.files'
2021-10-10 01:00:43 +00:00
CHARSET = 'u8'
2021-10-10 02:22:32 +00:00
CRT = 'mingw'
2021-10-10 02:01:32 +00:00
DISTRIBUTION = 'distrib'
2021-10-10 01:56:20 +00:00
SIGNATURE = '.sig'
2021-10-10 02:19:14 +00:00
SUBSYSTEM = 'msys'
2021-10-10 02:43:33 +00:00
ARCHITECTURES_SUBSYSTEMS = {
'x86_64': [SUBSYSTEM, 'clang64', 'mingw64', 'ucrt64'],
'i686': [SUBSYSTEM, 'clang32', 'mingw32'],
}
2021-10-10 02:19:14 +00:00
SUBSYSTEMS = [SUBSYSTEM, 'clang', 'mingw', 'ucrt']
2021-10-10 02:43:33 +00:00
def get_subsystems(architecture, families):
list = []
bits = ARCHITECTURES_BITS[architecture]
for family in families:
if family == SUBSYSTEM:
subsystem = family
else:
subsystem = f'{family}{bits}'
if subsystem in ARCHITECTURES_SUBSYSTEMS[architecture]:
list.append(subsystem)
return list