[python-win32] Recurring DLL error with py2exe

Jacob Kruger blindza at gmail.com
Fri Aug 26 10:53:23 CEST 2011


Oh yes, and it also lets me build the .exe for the small test app making use of pyaudiere, so I can now get it to play sounds, with panning etc. quite easily - will just get some friends etc. to test this on cleaner, older versions of operating systems etc. once can upload the zip file to FTP server from home where connection is at least decent...<smile>

So, thanks again, and stay well

Jacob Kruger
Blind Biker
Skype: BlindZA
'...fate had broken his body, but not his spirit...'


----- Original Message ---------------

Subject: Re: [python-win32] Recurring DLL error with py2exe
   From: Jacob Kruger <jacobk at mailzone.co.za>
   Date: Fri, 26 Aug 2011 09:11:06 +0200
     To: <python-win32 at python.org>

>Thanks, Werner
>
>Adding the reference to the dll_excludes to the options dict made the
>py2exe setup.py now run fine.
>
>Stay well
>
>Jacob Kruger
>Blind Biker
>Skype: BlindZA
>'...fate had broken his body, but not his spirit...'
>
>
>----- Original Message ---------------
>
>Subject: Re: [python-win32] Recurring DLL error with py2exe
>   From: "Werner F. Bruhin" <werner.bruhin at free.fr>
>   Date: Thu, 25 Aug 2011 17:57:05 +0200
>     To: jacobk at mailzone.co.za
>     Cc: Jacob Kruger <blindza at gmail.com>,
>          python-win32 at python.org
>
>>On 08/25/2011 04:30 PM, Jacob Kruger wrote:
>>> Ok, where should I include that exclude line?
>>>
>>> I tried just copying it into the setup.py file a bit higher up, but not
>sure if needs to be specifically included in some part of it, and I found
>out if I also tried to tell it not to copy the MSVCRT subfolder it still
>generates that error so it must have something to do with the actual
>compilation processing of the external module or something, but, maybe if I
>just need to tell it to exclude those files from a specific spot in the
>setup.py file that could sort it out?
>>dll_exludes is a py2exe option, should we in your options dict - see
>below.
>>> Anyway, here's current source of my setup.py file:
>>> #---start of source---
>>> from glob import glob
>>> from distutils.core import setup
>>> import py2exe
>>> dll_excludes = ['libgdk-win32-2.0-0.dll', 'libgobject-2.0-0.dll',
>'tcl84.dll', 'tk84.dll', 'MSVCP90.dll', 'mswsock.dll', 'powrprof.dll']
>>> data_files = [
>>> ("Microsoft.VC90.CRT", glob(r'C:\Program Files\Microsoft Visual Studio
>9.0\VC\redist\x86\Microsoft.VC90.CRT\*.*'))
>>> ]
>>> #data_files= []
>>> options = {
>>>      "bundle_files": 1,
>>Option "1" is more trouble then it is worse - would recommend 2 and use 
>>a installer such as InnoSetup to deliver a single file.  Some of this is 
>>shown/explained on the wxPython wiki.
>>>      "ascii": 1, # to make a smaller executable, don't include the
>encodings
>>>      "compressed": 1, # compress the library archive
>>            "dll_excludes": dll_excludes,
>>>      }
>>>
>>> setup(
>>>      # The first three parameters are not required, if at least a
>>>      # 'version' is given, then a versioninfo resource is built from
>>>      # them and added to the executables.
>>>      version = "1.0.0",
>>>      description = "testingWxPython",
>>>      name = "aboutBox",
>>>      options = {'py2exe': options},
>>>
>>>      # targets to build
>>>      console = ["AboutBox.py"],
>>> data_files=data_files
>>>      )
>>> #---end of source---
>>>
>>> Could it also maybe be something to do with this line?:
>>>      console = ["AboutBox.py"],
>>>
>>> Since while setup.py is running in console mode, don't know if the
>resulting wxPython based .exe runs in a console mode window as such..?
>>No problem, it will show a console window and a second window is opened 
>>with the wxPython GUI.  This is sometimes handy to track down some 
>>tracebacks which don't show if you use "window".
>>
>>Werner
>
>_______________________________________________
>python-win32 mailing list
>python-win32 at python.org
>http://mail.python.org/mailman/listinfo/python-win32


More information about the python-win32 mailing list