[Python-Dev] versioned .so files for Python 3.2

Scott Dial scott+python-dev at scottdial.com
Fri Jun 25 10:53:21 CEST 2010


On 6/24/2010 8:23 PM, James Y Knight wrote:
> On Jun 24, 2010, at 5:53 PM, Scott Dial wrote:
>> If the package has .so files that aren't compatible with other version
>> of python, then what is the motivation for placing that in a shared
>> location (since it can't actually be shared)
> 
> Because python looks for .so files in the same place it looks for the
> .py files of the same package.

My suggestion was that a package that contains .so files should not be
shared (e.g., the entire lxml package should be placed in a
version-specific path). The motivation for this PEP was to simplify the
installation python packages for distros; it was not to reduce the
number of .py files on the disk.

Placing .so files together does not simplify that install process in any
way. You will still have to handle such packages in a special way. You
must still compile the package multiple times for each relevant version
of python (with special tagging that I imagine distutils can take care
of) and, worse yet, you have created a more trick install than merely
having multiple search paths (e.g., installing/uninstalling lxml for
*one* version of python is actually more difficult in this scheme).

Either the motivation for this PEP is inaccurate or I am failing to
understand how this is *simpler*. In the case of pure-python, this PEP
is clearly a win, but I have not seen an argument that it is a win for
.so files. Moreover, the PEP itself is titled "PYC Repository
Directories" (not "shared site-packages") and makes no mention of .so
files at all.

-- 
Scott Dial
scott at scottdial.com
scodial at cs.indiana.edu


More information about the Python-Dev mailing list