From eece48fb3d08caf8955e14986dcb97509f9ec4a8 Mon Sep 17 00:00:00 2001 From: Raoul Snyman Date: Thu, 15 Dec 2016 17:20:00 +0200 Subject: [PATCH] Only perform a debug PyInstaller build if the '--debug' flag is set --- builders/builder.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/builders/builder.py b/builders/builder.py index b1ed5c7..b0bf967 100644 --- a/builders/builder.py +++ b/builders/builder.py @@ -159,6 +159,7 @@ class Builder(object): help='Do NOT update the branch before building') parser.add_argument('--skip-translations', action='store_true', default=False, help='Do NOT update the language translation files') + parser.add_argument('--debug', action='store_true', default=False, help='Create a debug build') self.add_extra_args(parser) self.args = parser.parse_args() @@ -232,7 +233,7 @@ class Builder(object): self._print_verbose(' {:.<20} {}'.format('build path: ', self.build_path)) self._print_verbose('Overrides:') self._print_verbose(' {:.<20} {}'.format('branch **: ', self.branch_path)) - self._print_verbose(' {:.<20} {}'.format('documentation **: ', self.branch_path)) + self._print_verbose(' {:.<20} {}'.format('documentation **: ', self.documentation_path)) self._print_verbose(' {:.<20} {}'.format('version: ', self.version)) self._print_verbose(' {:.<20} {}'.format('work path: ', self.work_path)) @@ -279,11 +280,11 @@ class Builder(object): '-i', self.icon_path, '-n', 'OpenLP', self.openlp_script] - if not self.args.verbose: - cmd.append('--log-level=ERROR') - else: + if self.args.verbose: cmd.append('--log-level=DEBUG') - if not self.args.release: + else: + cmd.append('--log-level=ERROR') + if self.args.debug: cmd.append('-d') self._print_verbose('... {}'.format(' '.join(cmd))) output, error = self._run_command(cmd, 'Error running PyInstaller')