Skip to content

Commit

Permalink
polishing install options
Browse files Browse the repository at this point in the history
  • Loading branch information
gravures committed Feb 22, 2022
1 parent 5af95fc commit 289fa33
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
3 changes: 1 addition & 2 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ plugins_list = get_option('plugins')

# Requirements python modules that are required by our plugins
python_requires = {}
install_py = get_option('install-python-requirements')


# plugin obviously depends on gnome-builder
Expand Down Expand Up @@ -103,7 +102,7 @@ foreach key_module, require : python_requires
msg_out = 'Find python package @0@=@1@@2@, but require version=@3@'.format(module, ret.stdout().strip(), msg, require)
endif # end format msg

if install_py
if get_option('pip')
message(msg_out)
ret = run_command(
python_helper,
Expand Down
4 changes: 2 additions & 2 deletions meson_options.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ option('plugins',
'python-symbols'],
description : 'A comma separated list of plugins to install, default to all'
)
option('install-python-requirements',
option('pip',
type : 'boolean',
value : false,
description : 'Install python-plugins requirements'
description : 'Install python-plugins requirements with pip'
)
7 changes: 6 additions & 1 deletion python_helper
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,12 @@ def install_package(options):
print(cp.stderr, cp.stdout, file=sys.stderr)
sys.exit(1)
else:
print(cp.stdout)
out = ""
if cp.stderr is not None:
out += cp.stderr
if cp.stdout is not None:
out += cp.stdout
print(out)
sys.exit(0)


Expand Down

0 comments on commit 289fa33

Please sign in to comment.