aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/modules
diff options
context:
space:
mode:
authorDylan Baker <dylan@pnwbakers.com>2023-07-25 11:25:58 -0700
committerEli Schwartz <eschwartz93@gmail.com>2023-07-28 17:27:21 -0400
commitd9870ed54b27f853d43b4aaaf4daec86e92bd20e (patch)
treebcbd73a1f159ce5d0c1e4636c563ac75943cf98e /mesonbuild/modules
parent10a94d3e751ddff0121de41c17f16b4d24f8f3b3 (diff)
downloadmeson-d9870ed54b27f853d43b4aaaf4daec86e92bd20e.zip
meson-d9870ed54b27f853d43b4aaaf4daec86e92bd20e.tar.gz
meson-d9870ed54b27f853d43b4aaaf4daec86e92bd20e.tar.bz2
modules/python3: exclude name_prefix and name_suffix
We can remove these from `permittedKwargs` (like we've already done for `typed_kwargs`) and then remove the in body checks.
Diffstat (limited to 'mesonbuild/modules')
-rw-r--r--mesonbuild/modules/python3.py6
1 files changed, 1 insertions, 5 deletions
diff --git a/mesonbuild/modules/python3.py b/mesonbuild/modules/python3.py
index 90ee952..bc4d9af 100644
--- a/mesonbuild/modules/python3.py
+++ b/mesonbuild/modules/python3.py
@@ -47,14 +47,10 @@ class Python3Module(ExtensionModule):
'sysconfig_path': self.sysconfig_path,
})
- @permittedKwargs(known_shmod_kwargs)
+ @permittedKwargs(known_shmod_kwargs - {'name_prefix', 'name_suffix'})
@typed_pos_args('python3.extension_module', str, varargs=(str, mesonlib.File, CustomTarget, CustomTargetIndex, GeneratedList, StructuredSources, ExtractedObjects, BuildTarget))
@typed_kwargs('python3.extension_module', *_MOD_KWARGS, allow_unknown=True)
def extension_module(self, state: ModuleState, args: T.Tuple[str, T.List[BuildTargetSource]], kwargs: SharedModuleKW):
- if 'name_prefix' in kwargs:
- raise mesonlib.MesonException('Name_prefix is set automatically, specifying it is forbidden.')
- if 'name_suffix' in kwargs:
- raise mesonlib.MesonException('Name_suffix is set automatically, specifying it is forbidden.')
host_system = state.host_machine.system
if host_system == 'darwin':
# Default suffix is 'dylib' but Python does not use it for extensions.