On Tue, Feb 19, 2019 at 3:28 PM Alexander Revin <lyss...@gmail.com> wrote:
>
> Hi all,
>
> I have an idea regarding Python binary wheels on non-glibc platforms,
> and it seems that initially I've posted it to the wrong list ([1])
>
> Long story short, the proposal is to use platform tuples (like
> compiler ones) for wheel names, which will allow much broader platform
> support, for example:
>
> package-1.0-cp36-cp36m-amd64_linux_gnu.whl
> package-1.0-cp36-cp36m-amd64_linux_musl.whl
>
> So eventually only {platform tag} part will be modified. Glibc/musl
> detection is quite trivial and eventually will be based on existing
> one in PEP 513 [2].

The challenge here is: the purpose of a target triple is to tell a
compiler/linker toolchain which kind of code they should generate,
e.g. when cross-compiling. The purpose of a wheel tag is to tell you
whether a given wheel will work on a given system. It turns out these
are different things :-).

For example, Ubuntu 18.10 and RHEL 6 are both 'amd64-linux-gnu',
because they use the same instruction set, the same binary format
(ELF), etc. But if you build a wheel on Ubuntu 18.10, it definitely
will not work on RHEL 6. (The other way around might work, if you do
other things right.)

In practice Windows and macOS are already fine; the place where this
would be useful is Linux wheels for platforms that use non-Intel-based
architectures or non-glibc-libcs. We do have an idea for making it
easier to support newer glibcs and also extending to all
architectures: 
https://mail.python.org/archives/list/distutils-sig@python.org/thread/6AFS4HKX6PVAS76EQNI7JNTGZZRHQ6SQ/

Adding musl is a bit trickier since I'm not sure what the details of
their ABI compatibility are, and they intentionally make it difficult
to figure out whether you're running on musl. But if someone could
convince them to publish more information then we could fix that too.

-n

-- 
Nathaniel J. Smith -- https://vorpus.org
--
Distutils-SIG mailing list -- distutils-sig@python.org
To unsubscribe send an email to distutils-sig-le...@python.org
https://mail.python.org/mailman3/lists/distutils-sig.python.org/
Message archived at 
https://mail.python.org/archives/list/distutils-sig@python.org/message/H2LO7SOUQ3BIPIRA2Z6VC3VI3NFFVADS/

Reply via email to