architectures/subsystems
This commit is contained in:
parent
a2b3951e63
commit
7d3c4828fd
2 changed files with 22 additions and 11 deletions
|
@ -74,7 +74,7 @@ compression applying to archive
|
|||
|
||||
remote='https://repo.msys2.org',
|
||||
architectures=['x86_64'],
|
||||
subsystems=['msys', 'mingw64'],
|
||||
subsystems=['msys', 'mingw'],
|
||||
|
||||
filesystem='fs',
|
||||
compression='zst',
|
||||
|
|
27
remote.py
27
remote.py
|
@ -7,12 +7,20 @@ import hypertext
|
|||
|
||||
ARCHIVE = '.tar.xz'
|
||||
ARCHITECTURES = ['x86_64', 'i686']
|
||||
ARCHITECTURES_BITS = {
|
||||
'x86_64': 64,
|
||||
'i686': 32,
|
||||
}
|
||||
ARCHITECTURES_SUBSYSTEMS = {
|
||||
'x86_64': ['msys', 'clang64', 'mingw64', 'ucrt64'],
|
||||
'i686': ['msys', 'clang32', 'mingw32'],
|
||||
}
|
||||
CHARSET = 'u8'
|
||||
DISTRIBUTION = 'distrib'
|
||||
FILES = '.files'
|
||||
MINGW = 'mingw'
|
||||
SIGNATURE = '.sig'
|
||||
SUBSYSTEMS = ['msys', 'mingw64']
|
||||
SUBSYSTEMS = ['msys', 'clang', 'mingw', 'ucrt']
|
||||
|
||||
|
||||
class Remote:
|
||||
|
@ -34,12 +42,16 @@ class Remote:
|
|||
archive = archives[-1]
|
||||
a[architecture] = archive
|
||||
#
|
||||
for subsystem in self.subsystems:
|
||||
location = [self.location]
|
||||
if subsystem != SUBSYSTEMS[0]:
|
||||
location.append(MINGW)
|
||||
location = os.path.join(*location, subsystem, architecture,
|
||||
f'{subsystem}{FILES}')
|
||||
for ss in self.subsystems:
|
||||
location = self.location
|
||||
if ss == SUBSYSTEMS[0]:
|
||||
subsystem = ss
|
||||
location = os.path.join(location, subsystem, architecture)
|
||||
else:
|
||||
subsystem = f'{ss}{ARCHITECTURES_BITS[architecture]}'
|
||||
location = os.path.join(location, MINGW, subsystem)
|
||||
if subsystem in ARCHITECTURES_SUBSYSTEMS[architecture]:
|
||||
location = os.path.join(location, f'{subsystem}{FILES}')
|
||||
binary = requests.get(url).content
|
||||
c[architecture] = binary
|
||||
self.archives = a
|
||||
|
@ -50,5 +62,4 @@ class Remote:
|
|||
'Archives:']
|
||||
for architecture, archive in reversed(sorted(self.archives.items())):
|
||||
lines.append(f'{architecture} → {archive}')
|
||||
lines.append(f'Subsystems: {self.subsystems}')
|
||||
return os.linesep.join(lines)
|
||||
|
|
Loading…
Reference in a new issue