From 896de792910dc88426a88643cf6e3527ca10ffa9 Mon Sep 17 00:00:00 2001 From: Laurent Bachelier Date: Fri, 21 Dec 2018 18:03:16 +0100 Subject: [PATCH] setup: Allow providing arguments in the environment Since there is no way to provide build options, (the [] syntax seem to only work for dependencies) we use the environment variable WEBOOB_SETUP to allow people installing weboob from various tools to pass the options. This isn't a good solution, but it's better than nothing. --- setup.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index a028536583..c3fec85c31 100755 --- a/setup.py +++ b/setup.py @@ -194,7 +194,10 @@ class Options(object): options = Options() -args = list(sys.argv) +if os.getenv('WEBOOB_SETUP'): + args = os.getenv('WEBOOB_SETUP').split() +else: + args = sys.argv[1:] if '--hildon' in args and '--no-hildon' in args: print('--hildon and --no-hildon options are incompatible', file=sys.stderr) sys.exit(1) @@ -231,6 +234,6 @@ class Options(object): options.deps = False args.remove('--nodeps') -sys.argv = args +sys.argv = [sys.argv[0]] + args install_weboob() -- GitLab