MCPcopy Create free account
hub / github.com/ElementsProject/elements / check_host

Function check_host

test/get_previous_releases.py:193–210  ·  view source on GitHub ↗
(args)

Source from the content-addressed store, hash-verified

191
192
193def check_host(args) -> int:
194 args.host = os.environ.get('HOST', subprocess.check_output(
195 './depends/config.guess').decode())
196 if args.download_binary:
197 platforms = {
198 'aarch64-*-linux*': 'aarch64-linux-gnu',
199 'x86_64-*-linux*': 'x86_64-linux-gnu',
200 'x86_64-apple-darwin*': 'osx64',
201 'aarch64-apple-darwin*': 'osx64',
202 }
203 args.platform = ''
204 for pattern, target in platforms.items():
205 if fnmatch(args.host, pattern):
206 args.platform = target
207 if not args.platform:
208 print('Not sure which binary to download for {}'.format(args.host))
209 return 1
210 return 0
211
212
213def main(args) -> int:

Callers 1

mainFunction · 0.85

Calls 4

formatMethod · 0.80
getMethod · 0.45
decodeMethod · 0.45
itemsMethod · 0.45

Tested by

no test coverage detected