Remove some uses of mesonlib.run_once

These are basically doing what mlog.log(..., once=True) does, so lets
just use that. The once argument to mlog is newer, so these probably
should have been changed already.
pull/6736/head
Dylan Baker 5 years ago
parent e3beaf87a5
commit b231ff36df
  1. 4
      mesonbuild/modules/gnome.py
  2. 5
      mesonbuild/modules/i18n.py

@ -83,11 +83,11 @@ class GnomeModule(ExtensionModule):
mlog.bold('https://bugzilla.gnome.org/show_bug.cgi?id=774368'))
@staticmethod
@mesonlib.run_once
def _print_gdbus_warning():
mlog.warning('Code generated with gdbus_codegen() requires the root directory be added to\n'
' include_directories of targets with GLib < 2.51.3:',
mlog.bold('https://github.com/mesonbuild/meson/issues/1387'))
mlog.bold('https://github.com/mesonbuild/meson/issues/1387'),
once=True)
@FeatureNewKwargs('gnome.compile_resources', '0.37.0', ['gresource_bundle', 'export', 'install_header'])
@permittedKwargs({'source_dir', 'c_name', 'dependencies', 'export', 'gresource_bundle', 'install_header',

@ -16,7 +16,7 @@ import shutil
from os import path
from .. import coredata, mesonlib, build, mlog
from ..mesonlib import MesonException, run_once
from ..mesonlib import MesonException
from . import ModuleReturnValue
from . import ExtensionModule
from ..interpreterbase import permittedKwargs, FeatureNew, FeatureNewKwargs
@ -59,9 +59,8 @@ PRESET_ARGS = {
class I18nModule(ExtensionModule):
@staticmethod
@run_once
def nogettext_warning():
mlog.warning('Gettext not found, all translation targets will be ignored.')
mlog.warning('Gettext not found, all translation targets will be ignored.', once=True)
return ModuleReturnValue(None, [])
@staticmethod

Loading…
Cancel
Save