Mattsa008 / pybox2d

Automatically exported from code.google.com/p/pybox2d
Other
0 stars 0 forks source link

pybox2d and py2exe #28

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Attempt to build an executable with py2exe, have the program use 
pybox2d.

What is the expected output? What do you see instead?

Error-
Traceback (most recent call last):
  File "main.py", line 5, in <module>
  File "zipextimporter.pyo", line 82, in load_module
  File "util.pyo", line 1, in <module>
  File "zipextimporter.pyo", line 82, in load_module
  File "Box2D\__init__.pyo", line 23, in <module>
  File "zipextimporter.pyo", line 82, in load_module
  File "Box2D\Box2D.pyo", line 44, in <module>
  File "Box2D\Box2D.pyo", line 39, in swig_import_helper
ImportError: No module named _Box2D

What version of the product are you using? On what operating system?
2.0.21b, with Python 2.6 (x86)

Original issue reported on code.google.com by psnim2...@gmail.com on 19 Jan 2010 at 10:54

GoogleCodeExporter commented 8 years ago
I can confirm this and have found two temporary solutions:
1. Copy the Box2d folder to the working directory
2. Edit Box2D.py commenting out the whole if version_info >= (2,6,0): else 
block and
replace with just import _Box2D

Original comment by benjamin.debski@gmail.com on 20 Jan 2010 at 11:59

GoogleCodeExporter commented 8 years ago
Thanks for the tips, Benjamin. I'm not entirely sure of the reason behind this. 
I'd
imagine py2exe has trouble with every SWIG-based project if it can't handle 
pybox2d.
I'll get this on the Box2D if it ever comes back up, or I'll eventually have to 
make
my own page here.

Original comment by sir...@gmail.com on 24 Jan 2010 at 4:04