MCPcopy Create free account
hub / github.com/Codeya-IDE/deepin-ide / args

Function args

src/scripts/porting-script/code_porting.py:37–57  ·  view source on GitHub ↗

-S source path -B build path --cpu CPU Type

()

Source from the content-addressed store, hash-verified

35 os.makedirs(path)
36
37def args():
38 """
39 -S source path
40 -B build path
41 --cpu CPU Type
42 """
43 '''return command args'''
44 parser = argparse.ArgumentParser()
45 parser.add_argument('-S', '--source', dest='src', required=True, default=None, help='source foleder')
46 parser.add_argument('-B', '--build', dest='build', required=True, default=None, help='build output foleder')
47 parser.add_argument('--dcpu', dest='dcpu', required=True, help='architecture of dest cpu')
48 parser.add_argument('--scpu', dest='scpu', required=False, default='x86_64', help='architecture of source cpu')
49 args = parser.parse_args()
50
51 if args.scpu.lower() not in ToolConfig.SUPPORT_CPU_ARCH or args.dcpu.lower() not in ToolConfig.SUPPORT_CPU_ARCH:
52 LOGGER.error(
53 "usage:cpu type [%s or %s] not supported, %s supported." % (args.scpu.lower(), args.dcpu.lower(), ToolConfig.SUPPORT_CPU_ARCH)
54 )
55 exit(1)
56
57 return {"src": args.src, "build_dir": args.build, "src_cpu": args.scpu, "dest_cpu": args.dcpu}
58
59def get_progress(scan_api):
60 count = 0

Callers 1

code_porting.pyFile · 0.85

Calls 2

exitFunction · 0.85
errorMethod · 0.80

Tested by

no test coverage detected