<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 12 (filtered medium)">
<style>
<!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page Section1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.Section1
        {page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang=EN-US link=blue vlink=purple>
<div class=Section1>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>There is no single such document I'm aware of. Each version of Python
has exactly one official MSVC version, details of which can be found in
Python's PCBuild\readme.txt file. pywin32 uses distutils, and that too only
supports a single supported version - although other versions are supported in
one way or another (googling for MSSdk and DISTUTILS_USE_SDK should work).
VS2008 is supported by both Python and pywin32's svn/cvs trunk, so maybe that
is an option for you. The lack of official support and documentation is part
of the burden I mentioned <wink><o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Cheers,<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'>Mark<o:p></o:p></span></p>
<p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";
color:#1F497D'><o:p> </o:p></span></p>
<div style='border:none;border-left:solid blue 1.5pt;padding:0cm 0cm 0cm 4.0pt'>
<div>
<div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'>
<p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span
style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> Vernon Cole
[mailto:vernondcole@gmail.com] <br>
<b>Sent:</b> Tuesday, 29 January 2008 4:21 PM<br>
<b>To:</b> Mark Hammond<br>
<b>Cc:</b> Tim Roberts; Python-Win32 List<br>
<b>Subject:</b> Re: [python-win32] Embedding/bundling Python, best practices?<o:p></o:p></span></p>
</div>
</div>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal style='margin-bottom:12.0pt'>Mark:<br>
Where can one find a cookbook for HOW to build python and/or pywin32
from source? I guessed that one should use VS 2003 (which I have) but I
have no clue how to make it actually compile. Someone mentioned a patch
to compile using a later (2005?) version of Visual Studio. I really want to try
with VS 2008 express, so that I can work on my home machine, rather than the
one at work where we have the licen$ed version, but the first step is to make
it work with the supported environment. Where do I look for documentation?<br>
--<br>
Vernon Cole<o:p></o:p></p>
<div>
<p class=MsoNormal>On Mon, Jan 28, 2008 at 5:28 PM, Mark Hammond <<a
href="mailto:mhammond@skippinet.com.au">mhammond@skippinet.com.au</a>>
wrote:<o:p></o:p></p>
<div>
<p class=MsoNormal style='margin-bottom:12.0pt'>TimR wrote:<br>
<br>
> You need to set the Python path variable before calling the<br>
> interpreter. You can do that by setting the PYTHONPATH environment<br>
> variable, but I believe you can also do that by setting variables when<br>
> you initialize the interpreter.<o:p></o:p></p>
</div>
<p class=MsoNormal>Actually, if the 'lib' directory can be found relative to
pythonxx.dll, it<br>
should not be necessary to set PYTHONPATH at all. Even then, if it *was*<br>
necessary to set such a variable, it may be better to set PYTHONHOME instead<br>
- that should adjust PYTHONPATH (again, the lib can be located relative to<br>
that dir), along with ensuring sys.prefix etc are all correct, thereby<br>
allowing things like distutils to do the right thing.<o:p></o:p></p>
<div>
<p class=MsoNormal style='margin-bottom:12.0pt'><br>
> Py2exe might prove useful for you, if only because it scans through a<br>
> Python script and determines exactly which auxiliary DLLs and modules<br>
> the script needs in order to operate in a standalone environment.<br>
><br>
> > Also, our application is built with VS 2005, should Python also be<br>
> > built with the same VS version for compatibility?<br>
> ><br>
><br>
> Yes, this is required. The Python run-time DLL links to the Visual
C++<br>
> run-time library. My python24.dll, for example, links to
msvcr71.dll,<br>
> which is the run-time from VS 2003.<o:p></o:p></p>
</div>
<p class=MsoNormal>On the other hand, it would work fine if you built Python
and all modules<br>
with the same compiler. You can not *mix* compilers, but using a<br>
non-default one should work fine so long as you control every binary you<br>
load. That is a burden though.<br>
<br>
Cheers,<br>
<span style='color:#888888'><br>
Mark</span><o:p></o:p></p>
<div>
<div>
<p class=MsoNormal><br>
<br>
_______________________________________________<br>
python-win32 mailing list<br>
<a href="mailto:python-win32@python.org">python-win32@python.org</a><br>
<a href="http://mail.python.org/mailman/listinfo/python-win32" target="_blank">http://mail.python.org/mailman/listinfo/python-win32</a><o:p></o:p></p>
</div>
</div>
</div>
<p class=MsoNormal><o:p> </o:p></p>
</div>
</div>
</body>
</html>