[Zope-Perl] building pyperl on Windows

Gisle Aas gisle@ActiveState.com
23 Jan 2001 19:52:11 -0800


"Chris McDonough" <chrism@digicool.com> writes:

> I was wrong about this.
> 
> sys.prefix is defined in Windows.  It just shows up as a blank string if you
> don't find "python.exe" in the path in which the support files reside
> (although it finds everything else OK for whatever reason).  I had a copy of
> "python.exe" in my WINNT/system32 dir and that caused the problem.

Ok.  We have successfully built pyperl on Win32 both for Python 1.5.2
and Python 2.0.  As you probably discovered, there is already special
code to try to deal with the Win32 layout in the pyinc.py script.  If
you find other problems please let me know.

--Gisle

> ----- Original Message -----
> From: "Chris McDonough" <chrism@digicool.com>
> To: "Gisle Aas" <gisle@activestate.com>
> Cc: <zope-perl@zope.org>
> Sent: Tuesday, January 23, 2001 8:31 PM
> Subject: [Zope-Perl] building pyperl on Windows
> 
> 
> > Hi Gisle,
> >
> > The build routine for pyperl-1.0 beta 6 includes a script
> > "Python-Object/pyinc.py"
> >
> > It seems that you figure out the system dir (when running perl
> Makefile.PL)
> > by using sys.prefix in this script.
> >
> > Unfortunately, it seems on Windows that sys.prefix is the blank string (at
> > least on my binary install of Python 1.52.).
> >
> > A workaround is as follows:
> >
> > if sys.platform == 'win32':
> >  import site
> >  place = site.__file__[:-12]
> >  print os.path.dirname(place) + "\\Include"
> > else:
> >  print os.path.join(sys.prefix, 'include', 'python' + sys.version[:3])