py2exe and Py2.6

I keep testing this and found out that if I use "zipfile = r'lib/library.zip'," in the setup.py I get a folder "lib" which contains library.zip and all the wx specific .dll's and .pyd's (and obviously others if the program uses additional Python packages).

The above is normal py2exe behavior but now come the MSVC dll's into play. In this setup I have to have two copies of them, which is really not recommended by MS, one is under the application folder and the other in the application/lib folder.

If I remove them from the application folder then I get a Windows error "This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem." and if don't have them in the application/lib folder then I get a .log file with the following traceback.

Traceback (most recent call last):
  File "simplewx.py", line 3, in <module>
  File "wx\__init__.pyo", line 45, in <module>
  File "wx\_core.pyo", line 4, in <module>
  File "wx\_core_.pyo", line 12, in <module>
  File "wx\_core_.pyo", line 10, in __load
ImportError: DLL load failed: This application has failed to start because the application configuration is incorrect. Reinstalling the application may fix this problem.

I am guessing I get the first one because python26.dll is not happy/finding the MSVC dll's and the second case Python is happy but wxPython is not.

Anyone has some ideas on how one can use the "zipfile = r'lib/library.zip'," setup and only have one copy of the MSVC dll's?

Werner

Werner F. Bruhin wrote:
...

Anyone has some ideas on how one can use the "zipfile = r'lib/library.zip'," setup and only have one copy of the MSVC dll's?

Did some more googling and came across this post.

So, it seems that either we put the dll's into both folders or one use an installer to install them into Side by Side.

Obviously the post only talks about .msi, has anyone figured out how to install just msvc?90.dll using e.g. InnoSetup or some other installer. It would already be interesting to see what VC++ 8 puts into an .msi installer script, this should make it possible to translate this to e.g. InnoSetup syntax.

Werner

Robin,

Werner F. Bruhin wrote:

Werner F. Bruhin wrote:
...

Anyone has some ideas on how one can use the "zipfile = r'lib/library.zip'," setup and only have one copy of the MSVC dll's?

Did some more googling and came across this post.
C++ Team Blog

So, it seems that either we put the dll's into both folders or one use an installer to install them into Side by Side.

When you do this ACTCTX stuff (I assume you use this for the SxS magic) and I am guessing that you feed the folder where the wx dll's are located to "lpAssemblyDirectory". Could this be changed to feed it the app folder? And if yes, do you think this might resolve the issue of having to have two copies.

This is way over my head, so just throw it away if it is not helpful.

Werner

Werner F. Bruhin wrote:

Robin,

Werner F. Bruhin wrote:

Werner F. Bruhin wrote:
...

Anyone has some ideas on how one can use the "zipfile = r'lib/library.zip'," setup and only have one copy of the MSVC dll's?

Did some more googling and came across this post.
C++ Team Blog

So, it seems that either we put the dll's into both folders or one use an installer to install them into Side by Side.

When you do this ACTCTX stuff (I assume you use this for the SxS magic) and I am guessing that you feed the folder where the wx dll's are located to "lpAssemblyDirectory".

Actually I just have it use the manifest embedded in the _core_.pyd extension module so that it does not need to rely on a file in the file system. I felt that this was a safer approach to take.

You can probably edit the manifest embedded in the app's copy of the .pyd file as part of building the exe, but that may open its own can of worms...

Could this be changed to feed it the app folder? And if yes, do you think this might resolve the issue of having to have two copies.

I'll give it some more thought and see if I can come up with a more flexible solution.

···

--
Robin Dunn
Software Craftsman