[Zope-Perl] building pyperl on Windows

Chris McDonough chrism@digicool.com
Tue, 23 Jan 2001 22:35:47 -0500


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.

----- 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])
>
>
>
> _______________________________________________
> Zope-perl maillist  -  Zope-perl@zope.org
> http://lists.zope.org/mailman/listinfo/zope-perl
>
>