Thanks for that but Im not too familiar with py2exe.
This is what my setup looks like:

#!/usr/bin/env python
from distutils.core import setup
import py2exe
           
options = {'py2exe':{'excludes':['OpenGL'],
                    'packages':['ctypes','logging','weakref'],
                    'includes':['new','distutils.util'],
                    'bundle_files':1}},
data_files=[("",["PyOpenGL-3.0.0b1-py2.5.egg"]),
            ("",["setuptools-0.6c7-py2.5.egg"]),]

setup(console=["script.py"],options=options,data_files=data_files)

But it gives me the error:

Traceback (most recent call last):
  File "setup.py", line 12, in <module>
    setup(console=["sol4.py"],options=options,data_files=data_files)
  File "C:\Python25\lib\distutils\core.py", line 112, in setup
    _setup_distribution = dist = klass(attrs)
  File "C:\Python25\lib\site-packages\py2exe\__init__.py", line 80, in __i
    distutils.dist.Distribution.__init__(self, attrs)
  File "C:\Python25\lib\distutils\dist.py", line 237, in __init__
    for (command, cmd_options) in options.items():
AttributeError: 'tuple' object has no attribute 'items'

What am I doing wrong?
Thanks again

Sébastien Ramage wrote:
Hi !
I have the same problem and it seems to be a problem with eggs.
I have solved it by copying PyOpenGL-3.0.0b1-py2.5.egg and 
setuptools-0.6c7-py2.5.egg in my app directory
and add this on header of my script :

import sys
import os
sys.path.insert(0, os.path.join(sys.prefix, "PyOpenGL-3.0.0b1-py2.5.egg"))
sys.path.insert(0, os.path.join(sys.prefix, "setuptools-0.6c7-py2.5.egg"))

and add this in my setup script:

    options = {'py2exe':{'excludes':['OpenGL'],
                        'packages':['ctypes','logging','weakref'],
                        'includes':['new','distutils.util'],
                        'bundle_files':1}},
    data_files=[("",["PyOpenGL-3.0.0b1-py2.5.egg"]),
                ("",["setuptools-0.6c7-py2.5.egg"]),],

Seb

Astan Chee a écrit :
  
Hi,
  Im trying to make a .exe out of a pygame/pyopengl script using py2exe.
  The headers of my script looks like this:
  import sys
  from OpenGL.GL import *
  from OpenGL.GLU import *
  from OpenGL.arrays import formathandler
  formathandler.FormatHandler.chooseOutput( 'ctypesarrays' )
  import os, math, random
  import pygame
  from pygame.locals import *
  if sys.platform == 'win32' or sys.platform == 'win64':
     os.environ['SDL_VIDEO_CENTERED'] = '1'

  Im using py2exe 0.6.6 and pyopengl 3.0.0b1, and my setup.py file looks
  like this:

  #!/usr/bin/env python
  from distutils.core import setup
  import py2exe

  setup(console=["script.py"])

  And I can make the .exe fine, but when I try to run the .exe, I keep
  getting this error:

  Traceback (most recent call last):
   File "script.py", line 2, in <module>
   File "OpenGL\GL\__init__.pyc", line 2, in <module>
   File "OpenGL\raw\GL\__init__.pyc", line 6, in <module>
   File "OpenGL\raw\GL\constants.pyc", line 7, in <module>
   File "OpenGL\platform\__init__.pyc", line 57, in <module>
   File "OpenGL\platform\__init__.pyc", line 53, in _load
  RuntimeError: Unable to find an implementation for the 'win32' ('nt')
  platform

  I've tried various things like copying the openGL folder to the .exe
  folder and such, but it didnt work. What am I doing wrong here?
  Thanks
  Astan

  
    

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Py2exe-users mailing list
Py2exe-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/py2exe-users

  

-- 
"Formulations of number theory: Complete, Consistent, Non-trivial. Choose two."

Please think of the environment before printing this email.

This email and any attachments may be confidential and/or privileged. If you are not the intended recipient of this email, you must not disclose or use the information
contained in it. Please notify the sender immediately and delete this document if you have received it in error. We do not guarantee this email is error or virus free.