Skip to content

Use introspection to generate wheel tags #190

Closed
@dnicolodi

Description

@dnicolodi

In #189 it become clear that it is not really possible to map extension filenames to wheel tags in a robust way: the file names do not contain ABI tags. However, the python implementation which is running meson-python is the same as the one for which the extensions are being built. Therefore, we can introspect the interpreter to get the wheel tags. Using the packaging module seems the most straightforward way to do this.

The only open question is how to decide to go for an implementation ABI tag or a stable ABI tag. I don't think that Meson python module has a way to generate extension modules for the stable ABI, so maybe this is not important right now. But the current meson-python has some support to auto-detect this, so maybe it should be supported somehow.

Should we keep validating the extension filename suffixes against the suffixes accepted by the Python interpreter? The list of accepted suffixes is provided in importlib.machinery.EXTENSION_SUFFIXES thus the check is easily implemented. Should deeper checks be done?

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions