Re: The Wheel specification and compatibility tags on Windows

Cosimo Lupo <[email protected]>
Newsgroups gmane.comp.python.distutils.devel
Message-ID <CAPp41Bv=DB=k9vYeAywwYdMPVhFxB11=JkDm_q3SqU5NjOza-g@mail.gmail.com>
I would like to revive this 5 year old thread and see if we can stir things
up a bit.

Basically the problem is that, in the current state of the PEPs and build
tools, it is still not possible to build and distribute a Windows wheel
that includes an extension module compiled with Py_LIMITED_API.
Setuptools can successfully build such extension module on Windows (with
`.pyd` file extension and no extra specifiers in the module filename), and
these seems to work at least on CPython 3.5 and above. However the
`--py-limited-api cpXX` option of bdist_wheel command fails on Windows
because it attempts to use the `abi3` tag but the latter is not in the list
of compatible tags for that platform.
One can work around this by creating a wheel with `none` as the abi tag,
and `cp35.cp36.cp37` as the python implementation tag but this feels a bit
hackish.

Here are some unresolved questions from the old distutils-sig thread,
quoting Paul Moore:

> 2. How should tools determine which ABIs a given Python supports?
> (This is the get_supported function in wheel and distlib). The "Use"
> section of the PEP (http://www.python.org/dev/peps/pep-0425/#id1)
> gives a Linux-based example, but nothing normative and nothing that is
> understandable to a Windows user.

And from Vinay Sajip

> For Windows, we (eventually) need some low-level sysconfig-supported way
> to get the ABI information in an analogous way to how it happens on
POSIX: and
> because that's not currently there, distlib doesn't provide any ABI
information
> on Windows other than "none".

Other related links:
https://github.com/pypa/pip/issues/4445
https://mail.python.org/pipermail/distutils-sig/2018-January/031856.html

So.. what needs to be done here to allow distributing/installing Windows
wheels with Py_LIMITED_API support?
Thank you,

Cosimo Lupo

-- 
Cosimo Lupo

--
Distutils-SIG mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mm3/mailman3/lists/distutils-sig.python.org/
Message archived at https://mail.python.org/mm3/archives/list/[email protected]/message/QX4U7S4ETUBM4EFX6KXIQDOZSSW6RM2Y/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.