check_requirements()
try:
parser = argparse.ArgumentParser()
__add_options(parser)
PyInstaller.building.makespec.__add_options(parser)
PyInstaller.building.build_main.__add_options(parser)
PyInstaller.log.__add_options(parser)
PyInstaller.compat.__add_obsolete_options(parser)
parser.add_argument("filenames", metavar="scriptname", nargs="+",
help=("name of scriptfiles to be processed or "
"exactly one .spec-file"))
args = parser.parse_args(pyi_args)
PyInstaller.log.__process_options(parser, args)
// Print PyInstaller version, Python version and platform
// as the first line to stdout.
// This helps identify PyInstaller, Python and platform version
// when users report issues.
logger.info("PyInstaller: %s" % __version__)
logger.info("Python: %s" % platform.python_version())
logger.info("Platform: %s" % platform.platform())
// Skip creating .spec when .spec file is supplied
if args.filenames[0].endswith(".spec"):
spec_file = args.filenames[0]
else:
spec_file = run_makespec(**vars(args))