[Python-Dev] versioned .so files for Python 3.2
Barry Warsaw
barry at python.org
Wed Jul 21 15:08:28 CEST 2010
On Jul 16, 2010, at 12:16 AM, Amaury Forgeot d'Arc wrote:
>2010/7/15 Barry Warsaw <barry at python.org>:
>> The first draft of PEP 3149 is ready for review.
>
>I like it!
Cool!
>I think it could mention the case where packages are not installed
>in the canonical directory, but placed elsewhere along the PYTHONPATH.
>This is how I deploy applications, for example, and the differences
>between python versions makes this a pain.
Because of the way the results of ./configure are embodied in the Makefile's
$SO variable, and that variable is used unconditionally from sysconfig (and
thus distutils), once you've configured --with-so-abi-tag, that tag will be
used globally everywhere.
I've added a note about this.
>The specific case of Windows should be mentioned: each foo.pyd
>contains the name of the python library (Python27.dll) it has been
>linked with; It must be rebuilt for a major version change.
>IMO the Windows installers provided by python.org should be built with
>a tag that contains this major number.
The current version of the PEP and my implementation do not change the Windows
builds at all. I don't feel qualified to integrate the ideas expressed in PEP
3149 for Windows builds, but I would be happy to accept patches to either the
PEP or implementation to export the same tagging feature for Windows.
>> Thus for example, an initial implementation of PEP 384, compiled with
>> `--with-so-abi-tag=cpython-xy` would search for the following file
>> names when extension module `foo` is imported (in this order)::
>>
>> foo.abi3.so
>> foo.cpython-xy.so
>> foo.so
>
>Is this the correct order? IMO the so-abi-tag is more precise and the
>two first items should be swapped.
Good point, fixed.
>PyPy would also benefit from this patch: it can now use extension
>modules, but the ABI is slightly different. By default, PyPy would
>load only modules containing the ABI tag, and refuse foo.so which is
>incompatible for sure. But the installations could still be shared
>between Python implementations.
Interesting. I've added a note about this to the PEP.
Thanks for the feedback.
-Barry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/python-dev/attachments/20100721/2251779a/attachment.pgp>
More information about the Python-Dev
mailing list