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

M.-A. Lemburg mal at egenix.com
Wed Jun 30 22:35:56 CEST 2010


Barry Warsaw wrote:
> On Jun 25, 2010, at 12:35 AM, M.-A. Lemburg wrote:
> 
>> Scott Dial wrote:
>>> On 6/24/2010 5:09 PM, Barry Warsaw wrote:
>>>>> What use case does this address?
>>>>
>>>>> If you want to make it so a system can install a package in just one
>>>>> location to be used by multiple Python installations, then the version
>>>>> number isn't enough.  You also need to distinguish debug builds, profiling
>>>>> builds, Unicode width (see issue8654), and probably several other
>>>>> ./configure options.
>>>>
>>>> This is a good point, but more easily addressed.  Let's say a distro makes
>>>> three Python 3.2 variants available, one "normal" build, a debug build, and
>>>> UCS2 and USC4 versions of the above.  All we need to do is choose a different
>>>> .so ABI tag (see previous follow) for each of those builds.  My updated patch
>>>> (coming soon) allows you to define that tag to configure.  So e.g.
>>>
>>> Why is this use case not already addressed by having independent
>>> directories? And why is there an incentive to co-mingle these
>>> version-punned files with version-agnostic ones?
>>
>> I don't think this is a good idea. After a while your Python
>> lib directories would need some serious dusting off to make them
>> maintainable again.
>>
>> Disk space is cheap so setting up dedicated directories for each
>> variant will result in a much easier to manage installation.
>>
>> If you want a really clever setup, use hard links between those
>> directory (you can also use symlinks if you like).
>> Then a change in one Python file will automatically
>> propagate to all other variant dirs without any maintenance
>> effort. Together with PYTHONHOME this makes a really nice
>> virtualenv-like environment.
> 
> Note that I do believe there is a difference between what users maintaining
> their own Python installations might want, and what a distro needs to maintain
> its entire Python stack.  So while dedicated directories might make more sense
> if you're maintaining your own Python built from source, it doesn't make as
> much sense for a distro, as described in previous responses by Matthias.

Fair enough.

I haven't followed the thread closely, so Matthias will probably
already have answered this:

The Python default installation dir for
libs (including site-packages) is $prefix/lib/pythonX.X, so you
already have separate and properly versioned directory paths.

What difference would the extra version on the .so file make in
such a setup ?

-- 
Marc-Andre Lemburg
eGenix.com

Professional Python Services directly from the Source  (#1, Jun 30 2010)
>>> Python/Zope Consulting and Support ...        http://www.egenix.com/
>>> mxODBC.Zope.Database.Adapter ...             http://zope.egenix.com/
>>> mxODBC, mxDateTime, mxTextTools ...        http://python.egenix.com/
________________________________________________________________________
2010-07-19: EuroPython 2010, Birmingham, UK                18 days to go

::: Try our new mxODBC.Connect Python Database Interface for free ! ::::


   eGenix.com Software, Skills and Services GmbH  Pastor-Loeh-Str.48
    D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg
           Registered at Amtsgericht Duesseldorf: HRB 46611
               http://www.egenix.com/company/contact/


More information about the Python-Dev mailing list