View Single Post
Old 01-09-2012, 02:25 AM   #1
Kevin McAleavey
Junior Member
Kevin McAleavey began at the beginning.
 
Posts: 6
Karma: 10
Join Date: Jan 2012
Location: Albany, NY
Device: none
Calibre in a Python 3.2 world, attn: Kovid

The unix world is rapidly getting dragged into Python 3.x and our OS is just another one in that situation. We're planning to provide calibre with our upcoming release, but with other Python 3.x code, it has hopelessly broken calibre. It was so much of a showstopper for us that we had to consider removing calibre as we really need the other stuff. Tried correcting some syntax errors vis-a-vis 3.x but saw that was hopeless.

I wanted to keep calibre so much, stumbled onto a solution that should be able to be integrated into the next calibre release. 3.x versions of python set themselves up in environment as "python" and when the calibre in /usr/(local/)bin calls calibre there, at the top is "#!/usr/bin/env python" which will call 3.x by default. We also ship PY27, and a simple edit of that top line in "calibre" to "#!/usr/bin/env python2.7" in our case solved it and has calibre calling the older Python.

Kovid ... might want to consider coding up your call to ensure that the older Python is called here rather than the default of whatever is set as "python" in the environment. In our KNOS (BSD-based) OS, just changing that one line fixed it all.

I can be contacted at knosproject.com if you need more ...
Kevin McAleavey is offline   Reply With Quote