Review Request 109684: Make code python3 compatible.

Michael Jansen kde at michael-jansen.biz
Sat Mar 23 23:45:46 UTC 2013


On Saturday, March 23, 2013 11:37:18 PM Luca Beltrame wrote:
> > On March 23, 2013, 11:35 p.m., Luca Beltrame wrote:
> > > The issue is much deeper than this specific piece of code. In fact,
> > > fixing this part will not make the code Py3 compatible. The real
> > > problematic code is in PyKDE4, to be precise the kpythonpluginfactory
> > > (kpythonpluginfactory/ directory in PyKDE4) which is at the moment Py2
> > > only. If that can be adjusted (I have no idea if it can, since I'm
> > > amateur at best at C++) then we can think about making plasma and such
> > > Py3 compatible.
> I would be in favor of using eval, BTW. I would like to have Py2/Py3
> compatibility (the rest of PyKDE4 is in fact fully Py3 compliant).


But until pykde4 is python3 compatible compiling against python3 here is useless? Even if 
technically possible.

The we should for now do as i did for kross (another thing that has to be made python3 
compatible)

 
 # TODO: PYTHON3 Port: Use "find_package(PythonLibs 2 REQUIRED)" (CMAKE MODULE not 
KDELIBS)
 find_package(PythonLibrary 2 REQUIRED QUIET)
 if(PYTHONLIBRARY_FOUND)
     if(PYTHON_VERSION_MAJOR EQUAL 3)
         message(STATUS "Found Python: ${PYTHON_EXECUTABLE} (found version 
\"${PYTHON_VERSION_STRING}\") but only 2.x supported")
         set(PYTHONINTERP_FOUND False)
         set(PYTHONLIBRARY_FOUND False)
     else()
         message(STATUS "Found Python: ${PYTHON_EXECUTABLE} (found version 
\"${PYTHON_VERSION_STRING}\")")
     endif()
 endif()
The message naturally has to be adjusted.

Mike

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20130324/4dbbf6ca/attachment.html>


More information about the Plasma-devel mailing list