From e3a2e87c01a7ab482827240a52dba08e1106a0ee Mon Sep 17 00:00:00 2001 From: Luke Zulauf Date: Fri, 23 Jun 2017 17:38:43 -0700 Subject: [PATCH] Adding ability to override executable target --- gooey/python_bindings/config_generator.py | 10 ++++++---- gooey/python_bindings/gooey_decorator.py | 1 + 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/gooey/python_bindings/config_generator.py b/gooey/python_bindings/config_generator.py index c03098bc..82770200 100644 --- a/gooey/python_bindings/config_generator.py +++ b/gooey/python_bindings/config_generator.py @@ -8,10 +8,12 @@ def create_from_parser(parser, source_path, **kwargs): auto_start = kwargs.get('auto_start', False) - if hasattr(sys, 'frozen'): - run_cmd = quote(source_path) - else: - run_cmd = '{} -u {}'.format(quote(sys.executable), quote(source_path)) + run_cmd = kwargs.get('target') + if run_cmd is None: + if hasattr(sys, 'frozen'): + run_cmd = quote(source_path) + else: + run_cmd = '{} -u {}'.format(quote(sys.executable), quote(source_path)) build_spec = { 'language': kwargs.get('language', 'english'), diff --git a/gooey/python_bindings/gooey_decorator.py b/gooey/python_bindings/gooey_decorator.py index f33d198b..754fd5d6 100644 --- a/gooey/python_bindings/gooey_decorator.py +++ b/gooey/python_bindings/gooey_decorator.py @@ -21,6 +21,7 @@ def Gooey(f=None, advanced=True, language='english', auto_start=False, # TODO: add this to the docs. Used to be `show_config=True` + target=None, program_name=None, program_description=None, default_size=(610, 530),