module documentation

PEP 656 support. This module implements logic to detect if the currently running Python is linked against musl, and what musl version is used.

Function platform_tags Generate musllinux tags compatible to the current platform.
Class _MuslVersion Undocumented
Function _get_musl_version Detect currently-running musl runtime version.
Function _parse_musl_version Undocumented
def platform_tags(arch: str) -> Iterator[str]: (source)

Generate musllinux tags compatible to the current platform. :param arch: Should be the part of platform tag after the ``linux_`` prefix, e.g. ``x86_64``. The ``linux_`` prefix is assumed as a prerequisite for the current platform to be musllinux-compatible. :returns: An iterator of compatible musllinux tags.

@functools.lru_cache()
def _get_musl_version(executable: str) -> Optional[_MuslVersion]: (source)

Detect currently-running musl runtime version. This is done by checking the specified executable's dynamic linking information, and invoking the loader to parse its output for a version string. If the loader is musl, the output would be something like:: musl libc (x86_64) Version 1.2.2 Dynamic Program Loader

def _parse_musl_version(output: str) -> Optional[_MuslVersion]: (source)

Undocumented