Skip to content

Commit

Permalink
Fix mkenums and genmarshal argument names.
Browse files Browse the repository at this point in the history
Dashes aren't allowed in keyword argument names.
  • Loading branch information
QuLogic committed Sep 19, 2016
1 parent 5e8702d commit db4ab0d
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions mesonbuild/modules/gnome.py
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ def mkenums(self, state, args, kwargs):

cmd = ['glib-mkenums']
known_kwargs = ['comments', 'eprod', 'fhead', 'fprod', 'ftail',
'identifier-prefix', 'symbol-prefix', 'template',
'identifier_prefix', 'symbol_prefix', 'template',
'vhead', 'vprod', 'vtail']
known_custom_target_kwargs = ['install', 'install_dir', 'build_always',
'depends', 'depend_files']
Expand All @@ -360,7 +360,7 @@ def mkenums(self, state, args, kwargs):
add_template = True
sources = [value] + sources
elif arg in known_kwargs:
cmd += ['--' + arg, value]
cmd += ['--' + arg.replace('_', '-'), value]
elif arg not in known_custom_target_kwargs:
raise MesonException(
'Mkenums does not take a %s keyword argument.' % (arg, ))
Expand Down Expand Up @@ -395,16 +395,16 @@ def genmarshal(self, state, args, kwargs):
'Sources keyword argument must be a string or array.')

cmd = ['glib-genmarshal']
known_kwargs = ['internal', 'nostdinc', 'skip-source', 'stdinc',
'valist-marshallers']
known_kwargs = ['internal', 'nostdinc', 'skip_source', 'stdinc',
'valist_marshallers']
known_custom_target_kwargs = ['build_always', 'depends',
'depend_files', 'install_dir',
'install_header']
for arg, value in kwargs.items():
if arg == 'prefix':
cmd += ['--prefix', value]
elif arg in known_kwargs and value:
cmd += ['--' + arg]
cmd += ['--' + arg.replace('_', '-')]
elif arg not in known_custom_target_kwargs:
raise MesonException(
'Genmarshal does not take a %s keyword argument.' % (
Expand Down

0 comments on commit db4ab0d

Please sign in to comment.