Commit 896de792 authored by Laurent Bachelier's avatar Laurent Bachelier 🐧 Committed by Romain Bignon

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.
parent d561e1c0
......@@ -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 @@ if '--nodeps' in args:
options.deps = False
args.remove('--nodeps')
sys.argv = args
sys.argv = [sys.argv[0]] + args
install_weboob()
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment