aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/coredata.py
diff options
context:
space:
mode:
authorAndrew McNulty <amcn102@gmail.com>2023-04-24 09:52:28 +0200
committerEli Schwartz <eschwartz93@gmail.com>2023-08-14 20:02:09 -0400
commitc7308076966c1c55bc117ce9f7a7f49ac96acfa6 (patch)
tree826fcf546090c3a5155c1d730d34033563038d98 /mesonbuild/coredata.py
parent9d323020321893093492bc7d538c311c61398a1e (diff)
downloadmeson-c7308076966c1c55bc117ce9f7a7f49ac96acfa6.zip
meson-c7308076966c1c55bc117ce9f7a7f49ac96acfa6.tar.gz
meson-c7308076966c1c55bc117ce9f7a7f49ac96acfa6.tar.bz2
Python: Add 'limited_api' kwarg to extension_module
This commit adds a new keyword arg to extension_module() that enables a user to target the Python Limited API, declaring the version of the limited API that they wish to target. Two new unittests have been added to test this functionality.
Diffstat (limited to 'mesonbuild/coredata.py')
-rw-r--r--mesonbuild/coredata.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/mesonbuild/coredata.py b/mesonbuild/coredata.py
index e930dff..7bbc09e 100644
--- a/mesonbuild/coredata.py
+++ b/mesonbuild/coredata.py
@@ -1300,6 +1300,8 @@ BUILTIN_CORE_OPTIONS: 'MutableKeyedOptionDictType' = OrderedDict([
BuiltinOption(UserStringOption, 'Directory for site-specific, platform-specific files.', '')),
(OptionKey('purelibdir', module='python'),
BuiltinOption(UserStringOption, 'Directory for site-specific, non-platform-specific files.', '')),
+ (OptionKey('allow_limited_api', module='python'),
+ BuiltinOption(UserBooleanOption, 'Whether to allow use of the Python Limited API', True)),
])
BUILTIN_OPTIONS = OrderedDict(chain(BUILTIN_DIR_OPTIONS.items(), BUILTIN_CORE_OPTIONS.items()))