I am trying to bundle up a GTK+2 app on Win32 which uses PyGTK (from Cedric's pygtk installer). I have tried py2exe, cx_Freeze, and Gordon McMillan's Installer, but I can't seem to make a working standalone .exe file with any of them.

Since the PyGTK FAQ says that you can do this with py2exe, I'll just focus on that attempt for now.

I get a whole bunch of messages and py2exe creates an .exe file. When I run it, I get this error:

Traceback (most recent call last):
  File "<string>", line 17, in ?
  File "pygtk.pyc", line 73, in require
AssertionError: required version '2.0' not found on system

... which is probably a result of calling pygtk.require('2.0').

Here's my setup.py:

    # setup.py
    from distutils.core import setup
    import glob
    try:
        import py2exe
    except:
        import sys
        sys.stderr.write("You need py2exe.\n")

    import gtk_path
    dlls=[gtk_path.gtkdir[0] + '\\lib\\libglib-2.0-0.dll']

    setup(name="posgui",
          version="0.0.1",
          scripts=["posgui.pyw"],
          data_files=[(".", ["posgui.glade"]),
                      (".", dlls)],
    )

And here's setup.cfg:

    [py2exe]
    includes=pango,atk,gtk

(Adding the 'gtk' module in 'includes' doesn't seem to have an effect)

I do get the following warning:

    warning: py2exe: * The following modules were not found:
    warning: py2exe: *   FCNTL
    warning: py2exe: *   gdk
    warning: py2exe: *   javax.comm
    warning: py2exe: *   ltihooks

but I can't figure out how to resolve the gdk one, and I'm not using the other modules directly.

Here are some relevant version numbers:

  Python: 2.3
  py2exe: 0.4.1 and 0.4.2 (same results)
     GTK: GTK-Runtime-Environment-2.2.1.2.exe (from dropline)
   pygtk: 1.99.17

Any suggestions?

thanks,

--
Charles Lepple <[EMAIL PROTECTED]>
http://www.ghz.cc/charles/

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

Reply via email to