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',
|
remote='https://repo.msys2.org',
|
||||||
architectures=['x86_64'],
|
architectures=['x86_64'],
|
||||||
subsystems=['msys', 'mingw64'],
|
subsystems=['msys', 'mingw'],
|
||||||
|
|
||||||
filesystem='fs',
|
filesystem='fs',
|
||||||
compression='zst',
|
compression='zst',
|
||||||
|
|
27
remote.py
27
remote.py
|
@ -7,12 +7,20 @@ import hypertext
|
||||||
|
|
||||||
ARCHIVE = '.tar.xz'
|
ARCHIVE = '.tar.xz'
|
||||||
ARCHITECTURES = ['x86_64', 'i686']
|
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'
|
CHARSET = 'u8'
|
||||||
DISTRIBUTION = 'distrib'
|
DISTRIBUTION = 'distrib'
|
||||||
FILES = '.files'
|
FILES = '.files'
|
||||||
MINGW = 'mingw'
|
MINGW = 'mingw'
|
||||||
SIGNATURE = '.sig'
|
SIGNATURE = '.sig'
|
||||||
SUBSYSTEMS = ['msys', 'mingw64']
|
SUBSYSTEMS = ['msys', 'clang', 'mingw', 'ucrt']
|
||||||
|
|
||||||
|
|
||||||
class Remote:
|
class Remote:
|
||||||
|
@ -34,12 +42,16 @@ class Remote:
|
||||||
archive = archives[-1]
|
archive = archives[-1]
|
||||||
a[architecture] = archive
|
a[architecture] = archive
|
||||||
#
|
#
|
||||||
for subsystem in self.subsystems:
|
for ss in self.subsystems:
|
||||||
location = [self.location]
|
location = self.location
|
||||||
if subsystem != SUBSYSTEMS[0]:
|
if ss == SUBSYSTEMS[0]:
|
||||||
location.append(MINGW)
|
subsystem = ss
|
||||||
location = os.path.join(*location, subsystem, architecture,
|
location = os.path.join(location, subsystem, architecture)
|
||||||
f'{subsystem}{FILES}')
|
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
|
binary = requests.get(url).content
|
||||||
c[architecture] = binary
|
c[architecture] = binary
|
||||||
self.archives = a
|
self.archives = a
|
||||||
|
@ -50,5 +62,4 @@ class Remote:
|
||||||
'Archives:']
|
'Archives:']
|
||||||
for architecture, archive in reversed(sorted(self.archives.items())):
|
for architecture, archive in reversed(sorted(self.archives.items())):
|
||||||
lines.append(f'{architecture} → {archive}')
|
lines.append(f'{architecture} → {archive}')
|
||||||
lines.append(f'Subsystems: {self.subsystems}')
|
|
||||||
return os.linesep.join(lines)
|
return os.linesep.join(lines)
|
||||||
|
|
Loading…
Reference in a new issue