Re: [pygtk] Help: Problem with pygtk + py2exe

2004-08-03 Thread Jon Doda
Cedric Gustin wrote:

You should also comment out the "pygtk.require('2.0')" as it is not 
compatible with a py2exe'd application.

All the necessary files will be in the dist subdir but you still have to 
install a GTK+ runtime though...

Works with pygtk-2.2.0 and pygtk-2.3.95 + the GTK+ runtimes from 
dropline (2.2) and gladewin32 (2.4).

Hope it helps.
Thanks, that did the trick.
--
Jon Doda
___
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/


Re: [pygtk] Help: Problem with pygtk + py2exe

2004-08-02 Thread Cedric Gustin
Jon Doda wrote:
I'm trying to use py2exe on a small program written with pygtk.  The
program was developed on a Slackware system using python 2.3.4, pygtk
2.2.0, gtk+ 2.4.4 and glade 2.6.0.  It runs fine on windows when python,
gtk+ and pygtk are installed, but py2exe doesn't work.  When I run
"setup.py py2exe" py2exe does its thing, but the last message it prints
to the console is:
The following modules appear to be missing
['gdk', 'ltihooks']
Here is a working setup.py file for pygtk-demo.py
 Cut here 
# setup.py
from distutils.core import setup
import py2exe
import glob
opts = {
"py2exe": {
"includes": "pango,atk,gobject",
"dll_excludes": ["iconv.dll","intl.dll","libatk-1.0-0.dll", 
		"libgdk_pixbuf-2.0-0.dll","libgdk-win32-2.0-0.dll",
"libglib-2.0-0.dll","libgmodule-2.0-0.dll",
"libgobject-2.0-0.dll","libgthread-2.0-0.dll",
"libgtk-win32-2.0-0.dll","libpango-1.0-0.dll",
"libpangowin32-1.0-0.dll"],
}
}

setup(
console=["pygtk-demo.py"],
options=opts,
data_files=[("demos",
   glob.glob("demos\\*.py")),"gtk-logo-rgb.gif"],)
 Cut here 
You should also comment out the "pygtk.require('2.0')" as it is not 
compatible with a py2exe'd application.

All the necessary files will be in the dist subdir but you still have to 
install a GTK+ runtime though...

Works with pygtk-2.2.0 and pygtk-2.3.95 + the GTK+ runtimes from 
dropline (2.2) and gladewin32 (2.4).

Hope it helps.
Cedric
___
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/


[pygtk] Help: Problem with pygtk + py2exe

2004-08-01 Thread Jon Doda
I'm trying to use py2exe on a small program written with pygtk.  The
program was developed on a Slackware system using python 2.3.4, pygtk
2.2.0, gtk+ 2.4.4 and glade 2.6.0.  It runs fine on windows when python,
gtk+ and pygtk are installed, but py2exe doesn't work.  When I run
"setup.py py2exe" py2exe does its thing, but the last message it prints
to the console is:
The following modules appear to be missing
['gdk', 'ltihooks']
When I run the resulting executable it simply abends, with the error
message:
Traceback (most recent call last):
  File "votecounter.py", line 5, in ?
  File "gtk\__init__.pyc", line 92, in ?
AttributeError: 'module' object has no attribute 'Font'
When I import Pango explicity in my script the error message changes to:
Traceback (most recent call last):
  File "votecounter.py", line 6, in ?
  File "gtk\glade.pyc", line 9, in ?
  File "gtk\glade.pyc", line 7, in __load
ImportError: cannot import name Widget from gtk._gtk
But it still craps out, and at this point I'm out of ideas.  I've tried
pygtk 2.2.0 with the dropline gtk+ 2.2.4-3 installer and pygtk 2.3.94
with the gladewin32 gtk+ 2.4.4-rc2 installer, and both produce the same
result.  I've also tried the method for using py2exe that's in the pygtk
faq, but it doesn't appear to work with py2exe 0.5.x.
If anyone has any ideas on how to get this working it would be greatly
appreciated.  Thanks in advance.
___
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/