[fixup]: extension_module: allow specifying install_dir OR subdir

pull/3240/head
Mathieu Duponchelle 7 years ago
parent 423f2f5c92
commit ad296976f0
  1. 5
      mesonbuild/modules/python.py

@ -35,7 +35,6 @@ from ..dependencies.base import (
mod_kwargs = set(['subdir'])
mod_kwargs.update(shlib_kwargs)
mod_kwargs -= set(['install_dir', 'install_rpath'])
def run_command(python, command):
@ -245,6 +244,10 @@ class PythonHolder(ExternalProgramHolder, InterpreterObject):
if 'name_suffix' in kwargs:
raise mesonlib.MesonException('Name_suffix is set automatically, specifying it is forbidden.')
if 'subdir' in kwargs and 'install_dir' in kwargs:
raise InvalidArguments('"subdir" and "install_dir" are mutually exclusive')
if 'subdir' in kwargs:
subdir = kwargs.pop('subdir', '')
if not isinstance(subdir, str):
raise InvalidArguments('"subdir" argument must be a string.')

Loading…
Cancel
Save