Skip to content

[meson python module] Add limited_api optional argument to py.dependency() #15431

@AraHaan

Description

@AraHaan

The use case for this is when I want to use this in executable to build an embed exe using the limited api's python3.lib file 😭.

Currently doing this is impossible even if I manually add this in to it's c_args: ['-DPy_LIMITED_API=0x030C0000']

Currently I have a repository where I want to make the embed exe build with the limited api, however link step would fail to find the python3.lib file due to it defaulting to version specific lib instead.

It was because of this I decided for now to compile the _memimporter module from the py2exe source code that I would like to have as a separate C extension module file instead instead of being forced to use PyImport_AppendInitTab on it due to not being able to link to the limited API on the exe itself.

In Visual Studio I can safely compile my embed exe code with the limited API macro defined as long as the _memimporter code is not bundled in with the compiled code.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions