[Zope-Perl] building pyperl on Windows
Chris McDonough
chrism@digicool.com
Tue, 23 Jan 2001 20:31:06 -0500
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])