python23
Shawn J. Goff
shawn7400 at gmail.com
Mon Dec 17 08:46:43 PST 2012
qmi-codegen produces lots of python2/3 problems like this:
Traceback (most recent call last):
message = Message(object_dictionary, common_objects_dictionary)
File "../../build-aux/qmi-codegen/qmi-codegen", line 97, in <module>
message_list = MessageList(object_list_json, common_object_list_json)
File
"/home/shawn/projects/all-projects/fx/buildroot-fresh/output/build/libqmi-1.0.0/build-aux/qmi-codegen/Message.py",
line 56, in __init__
File
"/home/shawn/projects/all-projects/fx/buildroot-fresh/output/build/libqmi-1.0.0/build-aux/qmi-codegen/MessageList.py",
line 46, in __init__
message = Message(object_dictionary, common_objects_dictionary)
File
"/home/shawn/projects/all-projects/fx/buildroot-fresh/output/build/libqmi-1.0.0/build-aux/qmi-codegen/Message.py",
line 56, in __init__
self.id_enum_name =
string.upper(utils.build_underscore_name(self.fullname))
AttributeError: 'module' object has no attribute 'upper'
I have libqmi as a package in an automated build system, and this is
causing problems. I either have to make a custom build script that
creates a python->python2 symlink and modifies PATH for that package or
add a patch that specifies "python2" instead of "python" for the
interpreter in all the .py files. It looks like that codegen is some
standard thing; I'd like to find out if the upstream has been made
compatible with python3 and pull it into libqmi, but it looks like every
project just copies it in to their source and modifies it, so I can't
find the original source for this codegen stuff. Can anyone point me to it?
Would you be interested in accepting a patch with an updated codegen if
it's available? If not, would you want a patch that changes the "#!" to
point to python2 instead of python? I'm not sure that last solution is a
good solution; I don't know if everywhere you want to support has a
python2 symlink.
More information about the libqmi-devel
mailing list