Skip to content

Commit

Permalink
Refine code
Browse files Browse the repository at this point in the history
  • Loading branch information
jondy committed Apr 30, 2022
1 parent 21e5aaa commit e95a8cf
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/packer.py
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,8 @@ def _pyinstaller(src, entry, output, options, xoptions, args):
src = relpath(src)
output = relpath(output)
obfdist = os.path.join(output, 'obf')
packcmd = DEFAULT_PACKER['PyInstaller'][2] + [output] + options
initcmd = DEFAULT_PACKER['PyInstaller'][2] + [output]
packcmd = initcmd + options
script = os.path.join(src, entry)

if not script.endswith('.py') or not os.path.exists(script):
Expand Down Expand Up @@ -437,7 +438,7 @@ def _pyinstaller(src, entry, output, options, xoptions, args):
logging.info('Save patched .spec file to %s', patched_spec)

logging.info('Run PyInstaller with patched .spec file...')
run_command([sys.executable] + DEFAULT_PACKER['PyInstaller'][2] + [output] + ['-y', '--clean', patched_spec])
run_command([sys.executable] + initcmd + ['-y', '--clean', patched_spec])

if not args.keep:
if args.setup is None:
Expand Down

0 comments on commit e95a8cf

Please sign in to comment.