subsystems,bits

This commit is contained in:
Marc Beninca 2021-10-10 04:19:14 +02:00 committed by Marc Beninca
parent c09a71b322
commit 21464b0035
2 changed files with 12 additions and 11 deletions

View file

@ -7,14 +7,6 @@ import hypertext
import msys
ARCHITECTURES_BITS = {
'x86_64': 64,
'i686': 32,
}
ARCHITECTURES_SUBSYSTEMS = {
'x86_64': ['msys', 'clang64', 'mingw64', 'ucrt64'],
'i686': ['msys', 'clang32', 'mingw32'],
}
MINGW = 'mingw'
@ -40,9 +32,9 @@ class Remote:
subsystem = ss
location = os.path.join(location, subsystem, architecture)
else:
subsystem = f'{ss}{ARCHITECTURES_BITS[architecture]}'
subsystem = f'{ss}{msys.ARCHITECTURES_BITS[architecture]}'
location = os.path.join(location, MINGW, subsystem)
if subsystem in ARCHITECTURES_SUBSYSTEMS[architecture]:
if subsystem in msys.ARCHITECTURES_SUBSYSTEMS[architecture]:
location = os.path.join(location,
f'{subsystem}{msys.CATALOG}')
binary = requests.get(location).content