[Distutils] Explicitly constructing SOABI for Python 2.7
Daniel Holth
dholth at gmail.com
Tue Jan 28 14:29:09 CET 2014
+1
However, on Windows, I don't see most of the config vars. At least the
Unicode width is easy to get at in other ways.
We also need to update the PEP/implementation to allow/add to the list
of supported tags "py2.py3-none-(arch)" for cffi-type "doesn't use the
ABI" extensions. This might just be a bug in the implementation...
On Tue, Jan 28, 2014 at 5:40 AM, Nick Coghlan <ncoghlan at gmail.com> wrote:
> Currently, bdist_wheel doesn't set the ABI tag properly on Python 2.x
> - the SOABI symbol it expects to find isn't present. PEP 425 also
> disclaims dealing with the problem.
>
> However, PEP 3149 (which defined SOABI) explains how to define that
> based on 3 other syconfig flags: Py_DEBUG, Py_UNICODE_SIZE and
> WITH_PYMALLOC
>
>>>> sysconfig.get_config_var("SOABI")
>>>> sysconfig.get_config_var("Py_DEBUG")
> 0
>>>> sysconfig.get_config_var("Py_UNICODE_SIZE")
> 4
>>>> sysconfig.get_config_var("WITH_PYMALLOC")
> 1
>
> With those settings and the platform module (to get the current
> implementation), it is possible to figure out that the wheel ABI tag
> should be:
>
> cp27mu
>
> If Py_DEBUG was true, then it would be "cp27dmu"
> If WITH_PYMALLOC was false for some reason: "cp27u"
> And for a narrow Unicode build: "cp27m"
>
> That way, the ABI tagging would work properly in 2.x as well, rather
> than people getting the impression that wheels can't mark the ABI
> compatibility requirements properly.
>
> Cheers,
> Nick.
>
> --
> Nick Coghlan | ncoghlan at gmail.com | Brisbane, Australia
> _______________________________________________
> Distutils-SIG maillist - Distutils-SIG at python.org
> https://mail.python.org/mailman/listinfo/distutils-sig
More information about the Distutils-SIG
mailing list