rename msubprojects src_dir to source_dir

source_dir seems to be the most common name across the code base with 400+ hits
pull/11964/head
Rafael Silva 2 years ago committed by Jussi Pakkanen
parent 7fa09ecd1c
commit 6cb7ef1f3b
  1. 13
      mesonbuild/msubprojects.py

@ -685,15 +685,14 @@ def add_arguments(parser: argparse.ArgumentParser) -> None:
p.set_defaults(subprojects_func=Runner.packagefiles)
def run(options: 'Arguments') -> int:
src_dir = os.path.relpath(os.path.realpath(options.sourcedir))
if not os.path.isfile(os.path.join(src_dir, 'meson.build')):
mlog.error('Directory', mlog.bold(src_dir), 'does not seem to be a Meson source directory.')
source_dir = os.path.relpath(os.path.realpath(options.sourcedir))
if not os.path.isfile(os.path.join(source_dir, 'meson.build')):
mlog.error('Directory', mlog.bold(source_dir), 'does not seem to be a Meson source directory.')
return 1
subprojects_dir = os.path.join(src_dir, 'subprojects')
if not os.path.isdir(subprojects_dir):
mlog.log('Directory', mlog.bold(src_dir), 'does not seem to have subprojects.')
if not os.path.isdir(os.path.join(source_dir, 'subprojects')):
mlog.log('Directory', mlog.bold(source_dir), 'does not seem to have subprojects.')
return 0
r = Resolver(src_dir, 'subprojects', wrap_frontend=True, allow_insecure=options.allow_insecure, silent=True)
r = Resolver(source_dir, 'subprojects', wrap_frontend=True, allow_insecure=options.allow_insecure, silent=True)
if options.subprojects:
wraps = [wrap for name, wrap in r.wraps.items() if name in options.subprojects]
else:

Loading…
Cancel
Save