From 90b54c5f7f929c8274eb52647d2c8a26fb17ba39 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Sat, 5 Feb 2022 10:27:47 +0530 Subject: [PATCH] Get build-dep working again for changes to bypy --- setup.py | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/setup.py b/setup.py index 0b45a9ea7..30f1426fc 100755 --- a/setup.py +++ b/setup.py @@ -1413,7 +1413,7 @@ def build_dep() -> None: p.add_argument( '--platform', default='all', - choices='all macos linux linux-x86'.split(), + choices='all macos linux linux-32 linux-arm64 linux-64'.split(), help='Platforms to build the dep for' ) p.add_argument( @@ -1423,15 +1423,25 @@ def build_dep() -> None: help='Names of the dependencies, if none provided, build all' ) args = p.parse_args(sys.argv[2:], namespace=Options) + linux_platforms = [ + ['linux', '--arch=64'], + ['linux', '--arch=32'], + ['linux', '--arch=arm64'], + ] if args.platform == 'all': - platforms = ['linux', 'linux 32', 'macos'] - elif args.platform == 'linux-x86': - platforms = ['linux 32'] + platforms = linux_platforms + [['macos']] + elif args.platform == 'linux': + platforms = linux_platforms + elif args.platform == 'macos': + platforms = [['macos']] + elif '-' in args.platform: + parts = args.platform.split('-') + platforms = [[parts[0], f'--arch={parts[1]}']] else: - platforms = [args.platform] + raise SystemExit(f'Unknown platform: {args.platform}') base = [sys.executable, '../bypy'] for pf in platforms: - cmd = base + pf.split() + args.deps + cmd = base + pf + ['dependencies'] + args.deps run_tool(cmd)