[issue22980] C extension naming doesn't take bitness into account

Marc-Andre Lemburg report at bugs.python.org
Tue Dec 16 20:42:32 CET 2014


Marc-Andre Lemburg added the comment:

On 16.12.2014 14:38, Steve Dower wrote:
> 
> Steve Dower added the comment:
> 
> I justified leaving out the ABI tag in an earlier post as well as in an email to distutils-sig, where two of the PEPs you mention were developed, and nobody had any comment. Cache tags don't include platform information and are worthless here.

I was referring to ABI flags (https://www.python.org/dev/peps/pep-0425/#abi-tag),
eg. the "m" when using pymalloc. If we do stick with a PEP 425 format,
we should at least stay compatible to it - even if we don't necessarily
need this on Windows.

On Linux, the extensions use the PEP 3149 tags, e.g.

    readline.cpython-34m.so

Wouldn't it make sense to change those to the same PEP 425 style
format ?

Exmaple:

   readline.cp35m-linux-x86_64.so

The "_d" suffix on Windows would then turn into the "d" ABI flag.

Note that this only works nicely for Linux. For other platforms,
get_platform() returns a mess... e.g. on FreeBSD:

   freebsd-8.3-RELEASE-p3-i386   (32-bit)
   freebsd-8.3-RELEASE-p3-amd64  (64-bit)

instead of the more useful

   freebsd-i386
   freebsd-amd64

The situation is similar on other less main stream platforms,
so it may make sense to define mappings other than get_platform()
on those.

> distutils uses the first extension from _imp.extension_suffixes() and so will automatically tag binaries. I also tested with setuptools and Cython.

Ah, clever. So no additional patches are needed :-)

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue22980>
_______________________________________


More information about the Python-bugs-list mailing list