[pygtk] py2exe and pygtk issues
Fredrik Corneliusson
fredrik.corneliusson at gmail.com
Mon May 19 23:57:58 WST 2008
Hi,
I use this small bat (rename buildDOTbat to build.bat) file to handle
the copying of the necessary GTK files and do the py2exe build. It
assumes GTK runtime is installed in "C:\GTK".
BTW, why do you explicitly exclude the "gtk" and "gtk.glade" modules?
I've updated the "setup.py" to look more like the one I use.
Regards,
Fredrik
2008/5/4 Chris Cole <ccole2 at mix.wvu.edu>:
> Hey all,
> I'm trying to use py2exe under windows to get my pygtk application into
> a single executable. Here's my steps so far:
>
> 1. I've installed the latest and greatest gtk runtime, python 2.5,
> pycairo, pygobject, pygtk, py2exe via their respective windows installers
>
> 2. i've added a simple setup.py script which seems to work fine for my
> app (attached)
>
> 3. i run:
> python setup.py py2exe
> which gives me a dist directory with my executable
>
> 4. i try to run the executable and it fails on importing the gtk module.
> Everywhere I've read so far says you need to copy the proper gtk runtime
> directories (lib, bin, share, etc) into the dist directory. I've tried:
>
> - putting all the dll's into the dist directory
>
> - putting the lib, bin, share, etc. directories into dist/gtk and even
> set the following in my script:
>
> os.environ['PATH'] =3D ';gtk/lib;gtk/bin'
>
>
> - putting lib, bin, share, etc. into dist/
>
>
> but none of these work. It always fails on import gtk -- i've spent the
> last couple hours racking my brain (and google) and I can't figure it
> out. Any suggestions?
>
> Thanks,
> Chris
>
> _______________________________________________
> pygtk mailing list pygtk at daa.com.au
> http://www.daa.com.au/mailman/listinfo/pygtk
> Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
>
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: setup.py
Type: text/x-python
Size: 421 bytes
Desc: not available
Url : http://www.daa.com.au/pipermail/pygtk/attachments/20080519/d9d9f86e/s=
etup.py
-------------- next part --------------
A non-text attachment was scrubbed...
Name: buildDOTbat
Type: application/octet-stream
Size: 1240 bytes
Desc: not available
Url : http://www.daa.com.au/pipermail/pygtk/attachments/20080519/d9d9f86e/b=
uildDOTbat.obj
More information about the pygtk
mailing list