[Zope-Coders] silly windows request

Guido van Rossum guido@python.org
Thu, 10 Oct 2002 21:46:36 -0400


Well, at least I figured out why --prefix on Windows works differently
with Python 2.1 and 2.2.  (Python 2.3 is like 2.2.)

On Windows, --prefix gives the "Python root directory".  This is
typically something like C:\Python21 or C:\Python22.  This hasn't
changed.

But what has changed is the preferred location for installing Python
modules and packages.  In 2.1, the convention was to install modules
directly in the Python root directory.  But in 2.2 and later, this has
changed.  There's even a PEP about it (PEP 250).  The preferred place
is in the site-packages directory, and this is a sub-subdirectory of
the Lib subdirectory of the Python root directory.  IOW, it installs
in C:\Python23\Lib\site-packages without a --prefix, and if you use
--prefix C:\Zope\lib\python, it will install in
C:\Zope\lib\python\Lib\site-packages.  Totally logical.

What I *don't* know is a way to make the Zope install go into the
correct directory on Windows, independent of which Python's distutils
you use.  I think you should be able to use some combination of --home
and --install-data, but I'm not 100% sure; the distutils docs are, um,
lacking...

--Guido van Rossum (home page: http://www.python.org/~guido/)