There is a solution to that problem on the linked issue. Basically, you need to 
declare Py_LIMITED_API in your code or as an extra preprocessor variable.

Windows doesn’t use a filename suffix for python3.dll linked extensions as it 
will be handled at load time. The tag for the wheel is outside of my area, so 
hopefully someone can chime in on that for you.

Cheers,
Steve

Top-posted from my Windows phone

From: Cosimo Lupo
Sent: Monday, January 8, 2018 10:32
To: distutils-sig@python.org
Subject: Re: [Distutils] Should abi3 tag be usable on Windows?

It turns out setuptools is still linking to PYTHON36.DLL instead of PYTHNO3.DLL 
even when py_limited_api=True
https://github.com/pypa/setuptools/issues/1248

This is a different, though somewhat related, problem from the one concering 
wheel/pip pep425tags disallowing `abi3` tag on Windows.


On Sun, Jan 7, 2018 at 12:39 PM Cosimo Lupo <cos...@anthrotype.com> wrote:
I jut found this related pip issue: https://github.com/pypa/pip/issues/4445

(I myself as @anthrotype commented on that thread back in April last year but 
then completely forgot...)

After re-reading it now, it's still not clear to me what the resolution on that 
issue was.

On Sun, Jan 7, 2018 at 10:12 AM Cosimo Lupo <cos...@anthrotype.com> wrote:
Hello,

CFFI has recently added support for Py_LIMITED_API extension modules built for 
CPython 3.
The wheel module since version 0.30.0 also supports passing —py-limited-api 
cp3X to bdist_wheel command to allow the generated .whl to be installed on all 
CPython versions equal or greater than the one specified.

Yesterday I was trying to apply this on a cffi-built extension module, and it 
worked for Linux and macOS but failed for Windows:

https://github.com/hynek/argon2_cffi/pull/32

The AssertionError from wheel.pep425tags complains that a tag with abi3 would 
be unsupported for the target platform.

Alex Gronholm commented

> imp.get_suffixes() does not seem to contain any ABI3 suffixes, but I'm not 
> sure if this is even applicable on Windows.

Incidentally, I noticed one specific package, PyQt5, that distributes both 
abi3-tagged wheels for Mac and manylinux and Windows wheels for a range of 
cp35.cp36.cp37 but with abi tag set as “none”, and they do seem to work.

So, can one make such py_limited_api wheels work on Windows with the current 
state of the tooling, and if so how?

Thank you in advance

Cosimo Lupo


-- 
Cosimo Lupo


-- 
Cosimo Lupo

_______________________________________________
Distutils-SIG maillist  -  Distutils-SIG@python.org
https://mail.python.org/mailman/listinfo/distutils-sig

Reply via email to