Continuing the discussion in Wheels for musl (Alpine), here’s my draft to propose musllinux
. Sponsor needed.
Rendered restructedText version (GitHub).
The version below is converted to Markdown with pandoc. I did not read the result and it may contain rendering errors.
PEP: 9999
Title: Platform Tag for Linux Distributions Using Musl
Author: Tzu-ping Chung <uranusjr@gmail.com>
Sponsor: TBD
PEP-Delegate: TBD
Discussions-To: TBD
Status: Draft
Type: Informational
Content-Type: text/x-rst
Created: TBA
Abstract
This PEP proposes a new platfrom tag series musllinux
for binary
Python package distributions for a Python installation linked against
musl on a Linux distribution. The tag works similarly to the “perennial
manylinux” platform tags specified in 600
{.interpreted-text
role=“pep”}, but targeting platforms based on musl instead.
Motivation
With the wide use of containers, distributions such as Alpine Linux,
[alpine]{.citation} have been gaining more popularity than
ever. Many of them based on musl, [musl]{.citation} a
different libc implementation from glibc, and therefore cannot use the
existing manylinux
platform tags. This means that Python package
projects cannot deploy binary distributions on PyPI for them. Users of
such projects demand build constraints from those projects, putting
unnecessary burden on project maintainers.
Rationale
Logic behind the new platform tag largely follows
600
{.interpreted-text role=“pep”}, and require wheels using this tag
make similar promises. Please refer to the PEP for more details on
rationale and reasoning behind the design.
Specification
Tags using the new scheme will take the form:
musllinux_${MUSLMAJOR}_${MUSLMINOR}_${ARCH}
Distributions using the tag make similar promises to those discribed in
600
{.interpreted-text role=“pep”}, including:
- The distribution works on any mainstream Linux distributions with
musl version${MUSLMAJOR}.${MUSLMINOR}
or later. - The distribution’s
${ARCH}
matches the return value of
sysconfig.get_platform()
on the host system.
Backwards Compatibility
There are no backwards compatibility concerns in this PEP.
Rejected Ideas
Create a platform tag based specifically for Alpine Linux
Past experience on the manylinux
tag series shows this approach would
be too costly time-wise. The author feels the “works well with others”
rule both is more inclusive and works well enough in practice.
References
Copyright
This document is placed in the public domain or under the
CC0-1.0-Universal license, whichever is more permissive.
::: {#citations}
[alpine]{#alpine .citation-label}
[musl]{#musl .citation-label}
: https://musl.libc.org
:::