[Zope-Coders] silly windows request
Guido van Rossum
guido@python.org
Wed, 09 Oct 2002 15:22:30 -0400
> On Wed, 2002-10-09 at 14:47, Guido van Rossum wrote:
> > > Yes, I officially give up trying to make portable batch files.
> >
> > If you can tell me what the for loop tries to do, I could check in a
> > separate config98.bat that tries to do this.
>
> Glutton for punishment, eh? ;-)
>
> It tries to iterate over the lines in the tempfile python-for-zope.reg,
> which (hopefully!) contains the path to a Python interpreter on a line
> exactly like:
>
> Python.exe=C:\Program Files\Python\python.exe
>
> It should break apart this line and the FOUND_PYTHON batch file var
> should be set to "C:\Program Files\Python\python.exe". The script
> should do the right thing thereafter.
>
> Note that the configure.bat script should probably make user-visible
> note of the fact when its run that you can pass in the Python you wish
> to use by setting the PYTHON envvar in the shell before you run the
> configure.bat script:
>
> PYTHON=c:\MyPython\python.exe
>
> The registry-searching bit (and thus the bizarre for loop) will be
> skipped if this envvar is set.
Hm, I think I withdraw the offer. It seems too messy. And there's an
easy workaround in the comment (simply don't run the configure.bat
file :-).
> > I looked in c:\zope\lib\python. It contains a subdir Lib, which
> > contains a subdir site-packages, which has all the Zope code. Was
> > this intended?
>
> No. Bummer. This must be due to differences between the interpretation
> of the "--prefix=" argument to "setup.py" between distutils on W2k and
> Win98 (see line 77 of the windows Makefile). The intent of this line is
> to instruct distutils to install the stuff that's in the build tree's
> "lib/python" into the target dir's "lib/python".
>
> The same thing is done on UNIX by passing "--home=" instead of
> "--prefix=", but on Windows, distutils doesn't support "--home=". On
> Win2k, however, passing "--prefix=" does "the right thing" (maybe due to
> a bug?). As a result under Win2k, the files end up in
> "$(TARGET_DIR)/lib/python", not
> "$(TARGET_DIR)/lib/python/Lib/site-packages" like on 98. I'm not
> exactly sure how to fix this. I'll need to dig into the distutils code.
Mayone one of these options will work better?
install-base
root
install-lib
--Guido van Rossum (home page: http://www.python.org/~guido/)