[Zope-Coders] silly windows request

Chris McDonough chrism@ZOPE.COM
Fri, 11 Oct 2002 15:22:51 -0400


I think I've figured this out.  I've checked in changes to the
chrism-install-branch setup.py file that seem to make Windows
installation possible under Python 2.1/2.2/2.3.  I have tested it on
both Windows NT (both under Python 2.2b1 and Python 2.1.3) and UNIX
(only tried under 2.3a, but I suspect it works fine under 2.1.3 as
well).

Essentially, I just use a custom "install" class to ignore any of the
install schemes that distutils things are a good idea.  Instead, we
use a hardcoded scheme that just plops everything into
TARGET_DIR/lib/python.

I also might have made it possible to use the Makefile "nmake
uninstall" and "nmake clean" features on W98, but I've not verified
that they work.

I hope I didn't screw up any line endings in the process. ;-)

Thanks for your help.

-  C


----- Original Message -----
From: "Guido van Rossum" <guido@python.org>
To: "Chris McDonough" <chrism@zope.com>
Cc: <zope-coders@zope.org>
Sent: Thursday, October 10, 2002 9:46 PM
Subject: Re: [Zope-Coders] silly windows request


> 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/)
>