Make check-outs more like release (Re: [Zope3-dev] Re: Zope 3.0, and why ...

Tim Peters tim.peters at gmail.com
Tue Nov 23 11:22:50 EST 2004


[Tim Peters]
>> I'm sure this is pathetic, but I don't know what "lib/python" means,
>> likely because I'm only intimately familiar with current Pythons on
>> Windows.  There's no "lib/python" in the standard Windows Python, nor
>> does distutils on Windows create any such thing.  In fact, the only
>> places I've ever seen a "lib/python/" on Windows are in Zope2
>> checkouts and installs.  So I assumed lib/python was a Zope thing.
>>
>> On Linux, isn't the default Python library path
>>
>>     sys.prefix + '/lib/python' + sys.version[:3]
>>
>> ?  If so, then (a) that's platform-dependent; (b) that's not
>> "lib/python/" either (it contains the major.minor version number too);
>> and, (c) that's a Python thing, not really a distutils thing (i.e.,
>> distutils is following Python's conventions there, and they're
>> platform-specific despite that the `sys` module docs still only
>> mention the Unix scheme).

[Jim Fulton] 
> Good point. The lib/python directory is used by distutils when
> you specify a --home option to setup.py.  If you specify --home, then
> modules are installed into the lib/python subdirectory of the directory
> given by the home directory.

Ah, that clarifies.  It's again a platform-specific thing.  Before
Python 2.4, if you tried passing --home on Windows, it was ignored:

    warning: install: home option ignored on this platform

In 2.4, it's not ignored on Windows.  I'm not sure that what it does
then always makes sense; for example, by experiment with ZODB 3.3
built w/ 2.4, it refused to allow specifying an absolute path for
home=.  It allowed a relative path, and then created a tree like:

    <home>/bin/
        scripts
    <home>/include/python/ZODB3/
        .h files
    <home>/lib/python/
        ZODB packages

Maybe that's what it's supposed to do <wink>.

> We have this unreslved issue about whether Zope should be installed
> into site packages, or into a separate application area.  distutils
> has *some* support for a separate application area through --home.
> Of course, this isn't exposed to the binary installers.  This adds to
> the confusion IMO.

Yes.  On Windows there will also be confusion due to breaking from the
Zope2 Windows approach:  Zope2 on Windows installs itself under
"Program Files" (a Windows thing -- spelling varies across countries),
and comes with its own Python, intending to isolate Zope from whatever
Python the user may have installed.  That has attractions too,
although it made it clumsy at best to install 4th-party Python modules
that Zope developers could use (distutils installs those to the user's
Python on Windows, doesn't know anything about Zope2's Python, and
can't be told to use Zope2's Python).

FWIW, for Python programmers on Windows it's least surprising to
install under site-packages, just because that's where most other
installs end up.  For non-Python Windows users, Zope2's approach was
least surprising.  I suppose installing Zope somewhere other than
under either site-packages or Program Files would have the virtue of
surprising everyone <wink>.


More information about the Zope3-dev mailing list