Bug 325460

Summary: Python plugins are unusable
Product: [Applications] kate Reporter: Timothy Edmund Crosley <timothy.crosley>
Component: generalAssignee: KWrite Developers <kwrite-bugs-null>
Status: RESOLVED DOWNSTREAM    
Severity: major CC: jr, lbeltrame
Priority: NOR    
Version: 3.11.1   
Target Milestone: ---   
Platform: Kubuntu   
OS: Linux   
Latest Commit: Version Fixed In:

Description Timothy Edmund Crosley 2013-09-30 12:24:25 UTC
Upon installation of Kubuntu 13.10 Beta 2 - Python plugins do not work, and several errors are reported. Upon launching Kate from the terminal the first error that is reported is that 
/usr/lib/x86_64-linux-gnu/libpython2.7.so is not loadable - and sure enough running 

sudo ln -s /usr/lib/x86_64-linux-gnu/libpython2.7.so.1 /usr/lib/x86_64-linux-gnu/libpython2.7.so

resolves all issues.

Reproducible: Always

Steps to Reproduce:
1. Install Kubuntu 13.10
2. Launch Kate
3. Enable Python Plugins
Actual Results:  
Errors where reported

Expected Results:  
Usable Plugins
Comment 1 Dominik Haumann 2013-09-30 13:41:51 UTC
Jonathan, can you take care of this? According to the reporter, this is a Kubuntu issue.
Comment 2 Jonathan Riddell 2013-09-30 14:59:27 UTC
https://bugs.launchpad.net/ubuntu/+source/kate/+bug/1233215

a sip mystery :(
Comment 3 Jonathan Riddell 2013-10-01 12:47:08 UTC
Fixed it in our package by setting the path manually to the python library
-DPYTHON_LIBRARY=/usr/lib/x86_64-linux-gnu/libpython2.7.so.1
(it automatically picked up -DPYTHON_LIBRARY=/usr/lib/x86_64-linux-gnu/libpython2.7.so)

I think this is still an upstream issue though, we shouldn't have to set it manually, could be something up in Sip or how Kate uses the CMake variables.
Comment 4 Timothy Edmund Crosley 2013-10-02 02:19:23 UTC
Can I just say you guys are awesome? I've used KDE with various distributions for years (and with Kubuntu for the last ~2) but never reported a bug until now. I am amazed at how quickly it was acknowledged and came to some form of resolution.

Thank you!
Comment 5 Luca Beltrame 2013-10-02 11:58:13 UTC
PYTHON_LIBRARY is set to be the same as PYTHON_LIBRARIES (this to keep SC) in kdelibs's FindPythonLibrary.cmake. Therefore, if there is an issue, it lies within cmake's FindPythonLibs.cmake, which is the one setting PYTHON_LIBRARIES.

(Notice: I don't have a Kate checkout to look at how it's used for Pate).
Comment 6 Jonathan Riddell 2013-10-02 12:03:11 UTC
Yes the other culprit might be Ubuntu/Debian patches to FindPythonLibrary.cmake to support our  multiarch layout for libraries
Comment 7 Dominik Haumann 2013-10-02 19:27:32 UTC
The Kate Pate Python host uses 
  macro_optional_find_package(PythonLibrary)
FindPythonLibrary.cmake is shipped with kdelibs it seems.

The Kate Pate Python host then links to ${PYTHON_LIBRARY}.

If there is anything wrong with this, please let us know.
Comment 8 Dominik Haumann 2013-10-02 19:28:51 UTC
@Timothy: The bug is resolved so quickly mostly because of your well-described report, most importantly you provided the solution. So thanks for your contribution here :-)