[CC to py2exe-users]
I haven't tried anything with the new py2exe and py 2.6 yet, but my
guess is that you'll need to do something like embed Microsoft's
redistributables installer in your installer and invoke it as part of
your installation process if that SxS assembly is not already
installed on the target system.
I have not seriously used Python 2.6 with py2exe, also I have no experience
with this new manifest stuff, but a little experiment showed that this approach
seems to work for simple cases (I tested only on XP machines, not Vista!):
I deinstalled python 2.6 (since I had installed it 'for all users') and
installed it again 'for me only'. This installation copied the msvcr90.dll
and Microsoft.VC90.CRT.manifest files into the c:\python26 folder.
Then I ran py2exe over a very simple script ('print "Hi"') which created
an executable. This executable worked fine on a machine where msvcr90.dll
was installed in Windows\SxS (or how it's called), but did NOT run on another
machine where msvcr90.dll is not installed in Windows\SxS.
Then I copied the msvcr90.dll and Microsoft.VC90.CRT.manifest files into the dist
folder where py2exe had created my executable. Now the exe works on both machines.
When I tried to do the same for a simple wxPython script py2exe crashed because
it tried to load msvcp90.dll (IIRC), but didn't find it (it seems only to be installed
in the Windows\SxS folder). This may be a bug in py2exe.
Actually, there is a way to install the run-time DLLs in a local
subdirectory. You can create a subfolder called "Microsoft.VC90.CRT"
and copy the DLLs there. You still need a manifest, but you don't have
to go through the whole redistributable installer.
Do these DLLs require some kind of purchased license for distribution.
This thread seems to indicate that because Python 2.4/2.5 itself
distributes the DLL, anyone creating something with Python is also
licensed to redistribute it:
http://groups.google.com/group/comp.lang.python/browse_thread/thread/f8df5ed32b324a3f/
I am assuming that this would also apply to 2.6, but I'm not a lawyer
and don't want to be.
Python 2.6, in the LICENSE.txt file, contains a new paragraph specifying
additional conditions for windows. Hope this clarifies the license issue
(I am not a laywer, blah, blah):
<quote start>
Additional Conditions for this Windows binary build
···
---------------------------------------------------
This program is linked with and uses Microsoft Distributable Code,
copyrighted by Microsoft Corporation. The Microsoft Distributable Code
includes the following files:
msvcr90.dll
msvcp90.dll
msvcm90.dll
If you further distribute programs that include the Microsoft
Distributable Code, you must comply with the restrictions on
distribution specified by Microsoft. In particular, you must require
distributors and external end users to agree to terms that protect the
Microsoft Distributable Code at least as much as Microsoft's own
requirements for the Distributable Code. See Microsoft's documentation
(included in its developer tools and on its website at microsoft.com)
for specific details.
Redistribution of the Windows binary build of the Python interpreter
complies with this agreement, provided that you do not:
- alter any copyright, trademark or patent notice in Microsoft's
Distributable Code;
- use Microsoft’s trademarks in your programs’ names or in a way that
suggests your programs come from or are endorsed by Microsoft;
- distribute Microsoft's Distributable Code to run on a platform other
than Microsoft operating systems, run-time technologies or application
platforms; or
- include Microsoft Distributable Code in malicious, deceptive or
unlawful programs.
These restrictions apply only to the Microsoft Distributable Code as
defined above, not to Python itself or any programs running on the
Python interpreter. The redistribution of the Python interpreter and
libraries is governed by the Python Software License included with this
file, or by other licenses as marked.
<quote end>
--
Thanks,
Thomas