Re: [python-win32] Recurring DLL error with py2exe

2011-08-26 Thread Jacob Kruger
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...

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 
   Date: Fri, 26 Aug 2011 09:11:06 +0200
 To: 

>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" 
>   Date: Thu, 25 Aug 2011 17:57:05 +0200
> To: jac...@mailzone.co.za
> Cc: Jacob Kruger ,
>  python-win32@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@python.org
>http://mail.python.org/mailman/listinfo/python-win32
___
python-win32 mailing list
python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win32


Re: [python-win32] Recurring DLL error with py2exe

2011-08-26 Thread Jacob Kruger
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" 
   Date: Thu, 25 Aug 2011 17:57:05 +0200
 To: jac...@mailzone.co.za
 Cc: Jacob Kruger ,
  python-win32@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@python.org
http://mail.python.org/mailman/listinfo/python-win32


Re: [python-win32] Recurring DLL error with py2exe

2011-08-26 Thread RayS

At 06:02 AM 8/25/2011, Jacob Kruger wrote:


The last 2 lines rendered in that window are then the following:
*** finding dlls needed ***
error: MSVCP90.dll: No such file or directory

That specific DLL gets copied quite easily into the relevant 
subfolder of the dist folder when I run a similar command for my 
much larger, but, I suppose, simpler, mapData app, since that one 
doesn't try to import libraries/modules like piaudiere or wxPython as such.


Any thoughts on what could really be happening here, or should I try 
sort out reinstalling windows7 or something...?


I always explicitly bundle the *90 dlls with the exe using includes 
[], or the user needs the redistributable. Even if Win7 ships with 
*90 dlls you might still need explicit copies.
Re-view the tutorial for more setup hints 
http://www.py2exe.org/index.cgi/Tutorial#Step52 


I'm still wrangling with dynamic import errors...
___
python-win32 mailing list
python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win32


Re: [python-win32] Recurring DLL error with py2exe

2011-08-25 Thread Werner F. Bruhin

Tim and Mark,

On 08/25/2011 07:29 PM, Tim Roberts wrote:

Mark Mordeca wrote:

Hi,

Python is built using 2008.  You can find this in the readme.txt under the
PCbuild folder (from the 2.7.2 source at least):


Memory fault on my part.  I was thinking they had bypassed 2008 and gone
from 2005 straight to 2010, but I see both 2.6 and 2.7 use VS2008.

The OP's problem is that when he tries to compile the dll is not found 
by py2exe.


The simple solution which works for me is just to exclude it as I 
mentioned in a previous post and it is also mentioned in the wxPython 
wiki - http://wiki.wxpython.org/py2exe


IIRC this problem only shows up with py 2.6 and higher.

Werner

___
python-win32 mailing list
python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win32


Re: [python-win32] Recurring DLL error with py2exe

2011-08-25 Thread Tim Roberts
Mark Mordeca wrote:
> Hi,
>
> Python is built using 2008.  You can find this in the readme.txt under the
> PCbuild folder (from the 2.7.2 source at least):

Memory fault on my part.  I was thinking they had bypassed 2008 and gone
from 2005 straight to 2010, but I see both 2.6 and 2.7 use VS2008.

-- 
Tim Roberts, t...@probo.com
Providenza & Boekelheide, Inc.

___
python-win32 mailing list
python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win32


Re: [python-win32] Recurring DLL error with py2exe

2011-08-25 Thread Mark Mordeca
Hi,

Python is built using 2008.  You can find this in the readme.txt under the
PCbuild folder (from the 2.7.2 source at least):
"This directory is used to build Python for Win32 and x64 platforms, e.g.
Windows 2000, XP, Vista and Windows Server 2008.  In order to build 32-bit
debug and release executables, Microsoft Visual C++ 2008 Express Edition
is
required at the very least.  In order to build 64-bit debug and release
executables, Visual Studio 2008 Standard Edition is required at the very
least.  In order to build all of the above, as well as generate release
builds
that make use of Profile Guided Optimisation (PG0), Visual Studio 2008
Professional Edition is required at the very least.  The official Python
releases are built with this version of Visual Studio."

Thanks.
Mark

-Original Message-
From: python-win32-bounces+mark.mordeca=prosensus...@python.org
[mailto:python-win32-bounces+mark.mordeca=prosensus...@python.org] On
Behalf Of Tim Roberts
Sent: Thursday, August 25, 2011 12:57 PM
To: Python-Win32 List
Subject: Re: [python-win32] Recurring DLL error with py2exe

Jacob Kruger wrote:
> Typed in following command line code using sort of standard setup.py
file that works on other things like my mapData IF engine, but did change
the name of the .py file it should process:
> python setup.py py2exe
>
> The last 2 lines rendered in that window are then the following:
> *** finding dlls needed ***
> error: MSVCP90.dll: No such file or directory
>
> That specific DLL gets copied quite easily into the relevant subfolder
of the dist folder when I run a similar command for my much larger, but, I
suppose, simpler, mapData app, since that one doesn't try to import
libraries/modules like piaudiere or wxPython as such.

MSVCP90.DLL is one of the DLLs caught up in the Microsoft "side-by-side"
stupidity.  It cannot just be copied into a destination folder, it has
to be properly installed with a manifest.

Do you have some custom extensions?  I didn't think there were any
versions of Python that were built with Visual Studio 2008.  VS2010
wisely eliminates the side-by-side stuff for the CRT DLLs, so the
problem goes away.

-- 
Tim Roberts, t...@probo.com
Providenza & Boekelheide, Inc.

___
python-win32 mailing list
python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win32
___
python-win32 mailing list
python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win32


Re: [python-win32] Recurring DLL error with py2exe

2011-08-25 Thread Jacob Kruger

Custom extensions?

Not in VS.Net itsself, and aside from other general stuff on machine, it 
still works for the other python code, and only seems to generate this 
error/issue when trying to generate .exe files for these two pieces that 
make use of either piaudiere or now wxPython as such.


Stay well

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

- Original Message - 
From: "Tim Roberts" 

To: "Python-Win32 List" 
Sent: Thursday, August 25, 2011 6:57 PM
Subject: Re: [python-win32] Recurring DLL error with py2exe



Jacob Kruger wrote:
Typed in following command line code using sort of standard setup.py file 
that works on other things like my mapData IF engine, but did change the 
name of the .py file it should process:

python setup.py py2exe

The last 2 lines rendered in that window are then the following:
*** finding dlls needed ***
error: MSVCP90.dll: No such file or directory

That specific DLL gets copied quite easily into the relevant subfolder of 
the dist folder when I run a similar command for my much larger, but, I 
suppose, simpler, mapData app, since that one doesn't try to import 
libraries/modules like piaudiere or wxPython as such.


MSVCP90.DLL is one of the DLLs caught up in the Microsoft "side-by-side"
stupidity.  It cannot just be copied into a destination folder, it has
to be properly installed with a manifest.

Do you have some custom extensions?  I didn't think there were any
versions of Python that were built with Visual Studio 2008.  VS2010
wisely eliminates the side-by-side stuff for the CRT DLLs, so the
problem goes away.

--
Tim Roberts, t...@probo.com
Providenza & Boekelheide, Inc.

___
python-win32 mailing list
python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win32 


___
python-win32 mailing list
python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win32


Re: [python-win32] Recurring DLL error with py2exe

2011-08-25 Thread Werner F. Bruhin

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@python.org
http://mail.python.org/mailman/listinfo/python-win32


Re: [python-win32] Recurring DLL error with py2exe

2011-08-25 Thread Tim Roberts
Jacob Kruger wrote:
> Typed in following command line code using sort of standard setup.py file 
> that works on other things like my mapData IF engine, but did change the name 
> of the .py file it should process:
> python setup.py py2exe
>
> The last 2 lines rendered in that window are then the following:
> *** finding dlls needed ***
> error: MSVCP90.dll: No such file or directory
>
> That specific DLL gets copied quite easily into the relevant subfolder of the 
> dist folder when I run a similar command for my much larger, but, I suppose, 
> simpler, mapData app, since that one doesn't try to import libraries/modules 
> like piaudiere or wxPython as such.

MSVCP90.DLL is one of the DLLs caught up in the Microsoft "side-by-side"
stupidity.  It cannot just be copied into a destination folder, it has
to be properly installed with a manifest.

Do you have some custom extensions?  I didn't think there were any
versions of Python that were built with Visual Studio 2008.  VS2010
wisely eliminates the side-by-side stuff for the CRT DLLs, so the
problem goes away.

-- 
Tim Roberts, t...@probo.com
Providenza & Boekelheide, Inc.

___
python-win32 mailing list
python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win32


Re: [python-win32] Recurring DLL error with py2exe

2011-08-25 Thread Jacob Kruger
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?

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,
"ascii": 1, # to make a smaller executable, don't include the encodings
"compressed": 1, # compress the library archive
}

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..?

Thanks

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" 
   Date: Thu, 25 Aug 2011 16:06:05 +0200
 To: python-win32@python.org

>Hi Jacob,
>
>On 08/25/2011 03:02 PM, Jacob Kruger wrote:
>> Thought this problem was specific to pyaudiere, but now got same thing when 
>> tried to test using py2exe on a very small, test wxPython app to make sure 
>> it was worth focusing on this in terms of GUI's etc., but it again tells me 
>> the same thing.
>>
>> Typed in following command line code using sort of standard setup.py file 
>> that works on other things like my mapData IF engine, but did change the 
>> name of the .py file it should process:
>> python setup.py py2exe
>>
>> The last 2 lines rendered in that window are then the following:
>> *** finding dlls needed ***
>> error: MSVCP90.dll: No such file or directory
>>
>> That specific DLL gets copied quite easily into the relevant subfolder of 
>> the dist folder when I run a similar command for my much larger, but, I 
>> suppose, simpler, mapData app, since that one doesn't try to import 
>> libraries/modules like piaudiere or wxPython as such.
>>
>> Any thoughts on what could really be happening here, or should I try sort 
>> out reinstalling windows7 or something...?
>py2exe is getting confused on this DLL for some reason, you just need to 
>exclude it.
>
>dll_excludes = ['libgdk-win32-2.0-0.dll', 'libgobject-2.0-0.dll', 
>'tcl84.dll', 'tk84.dll', 'MSVCP90.dll', 'mswsock.dll', 'powrprof.dll']
>
>Additional information for wxPython and py2exe can be found on the wiki 
>here:
>
>http://wiki.wxpython.org/py2exe
>
>Werner
>
>___
>python-win32 mailing list
>python-win32@python.org
>http://mail.python.org/mailman/listinfo/python-win32
___
python-win32 mailing list
python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win32


Re: [python-win32] Recurring DLL error with py2exe

2011-08-25 Thread Werner F. Bruhin

Hi Jacob,

On 08/25/2011 03:02 PM, Jacob Kruger wrote:

Thought this problem was specific to pyaudiere, but now got same thing when 
tried to test using py2exe on a very small, test wxPython app to make sure it 
was worth focusing on this in terms of GUI's etc., but it again tells me the 
same thing.

Typed in following command line code using sort of standard setup.py file that 
works on other things like my mapData IF engine, but did change the name of the 
.py file it should process:
python setup.py py2exe

The last 2 lines rendered in that window are then the following:
*** finding dlls needed ***
error: MSVCP90.dll: No such file or directory

That specific DLL gets copied quite easily into the relevant subfolder of the 
dist folder when I run a similar command for my much larger, but, I suppose, 
simpler, mapData app, since that one doesn't try to import libraries/modules 
like piaudiere or wxPython as such.

Any thoughts on what could really be happening here, or should I try sort out 
reinstalling windows7 or something...?
py2exe is getting confused on this DLL for some reason, you just need to 
exclude it.


dll_excludes = ['libgdk-win32-2.0-0.dll', 'libgobject-2.0-0.dll', 
'tcl84.dll', 'tk84.dll', 'MSVCP90.dll', 'mswsock.dll', 'powrprof.dll']


Additional information for wxPython and py2exe can be found on the wiki 
here:


http://wiki.wxpython.org/py2exe

Werner

___
python-win32 mailing list
python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win32