aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/scripts/python_info.py
AgeCommit message (Collapse)AuthorFilesLines
2023-08-14Python: Add 'limited_api' kwarg to extension_moduleAndrew McNulty1-0/+15
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.
2023-02-24work around circular imports in python probe scriptEli Schwartz1-3/+7
It seems this happens because at some point setuptools imports gettext, and we have a script by the same name. In general, this path injection by default is bad news for our use case. Python 3.11 introduced -P for this reason, but we cannot depend on that. Instead, check for it first, and delete it, before doing more imports.
2023-02-22python module: move the introspection script into an external scriptEli Schwartz1-0/+75
We write this out as an embedded string to a tempfile in order to run it, which is pretty awkward. And usually Meson's files are already files on disk, not packed into a zip, so we can simply run it directly. Since python 3.7, which is our new minimum, we can handle this well via the stdlib. (There's also mesonbuild.mesondata, but we do not need persistence in the builddir.) This also solves the problem that has always been there, of giant python programs inside strings occasionally confusing syntax highlighters. Or even, it would be nice if we had syntax highlighting for this introspection program. :D