cfbraun / python-on-a-chip

Automatically exported from code.google.com/p/python-on-a-chip
Other
0 stars 0 forks source link

Invalid compilation with Python > 2.6 #227

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Try to compile the project from SVN (both v09 and v10) using Python > 2.6
2. Execute it

What is the expected output? What do you see instead?
It should compile and work correctly, but instead it crash showing a traceback. 
According to this thread 
(http://groups.google.com/group/python-on-a-chip/browse_thread/thread/d7fbb6e929
b5e437), it was thinked that maybe it was related to Python 2.7 generating 
bytecodes not interpreted by PyMite. As solution, it was proposed to use Python 
2.6, working this time.

As a simple hack/solution, i have changed pmImgCreator.py shebang from 
#!/usr/bin/env python to #!/usr/bin/env python2.6. Another proposed solution 
was to detect the python bytecode version to be sure it's valid for PyMite.

Original issue reported on code.google.com by piranna on 15 Feb 2012 at 2:13

GoogleCodeExporter commented 9 years ago
Another (more future proof) solution would be to implement the non existent 
bytecodes (althought it will require a lot more time to do it...)

Original comment by piranna on 16 Feb 2012 at 8:36

GoogleCodeExporter commented 9 years ago
For now, I will check that the CPython version is 2.6 inside 
src/tools/pmImgCreator.py

Original comment by dwhall...@gmail.com on 20 Feb 2012 at 2:47

GoogleCodeExporter commented 9 years ago
This issue was closed by revision a2195bba2472.

Original comment by dwhall...@gmail.com on 20 Feb 2012 at 2:55

GoogleCodeExporter commented 9 years ago
This issue was closed by revision 37d536ebc16d.

Original comment by dwhall...@gmail.com on 20 Feb 2012 at 3:32

GoogleCodeExporter commented 9 years ago
I have done a pull with the changes and now it launch the assert correctly 
because by default Ubuntu use Python 2.7, but how i can be able to specify the 
Python interpreter? Makefiles call pmImgCreator.py directly... One solution 
would be to modify Makefiles to instead of call pmImgCreator.py as executables 
call them as scripts, like this:

$(PYTHON) $(pmImgCreator)

This way it could be possible to define the Python version in the same way it's 
defined the platform to create...

Original comment by piranna on 21 Feb 2012 at 9:40