This forum has been archived. All content is frozen. Please use KDE Discuss instead.

KDevelop python

Tags: None
(comma "," separated)
dummytester
Registered Member
Posts
40
Karma
0
OS

KDevelop python

Wed Dec 26, 2012 9:11 pm
I mentioned in another thread that I was having trouble finding out how to get the kdev-python plugin. Searching for python in this forum only turned up 4 results.

I found that the sig of scummos points to https://projects.kde.org/projects/playg ... dev-python but this is a dead link. Instead I looked at his profile, found his blog, and from there found http://scummos.blogspot.com/2012/11/kde ... eased.html.

I haven't followed the directions to compile yet. Wish this was available from the package repos; why not add a ubuntu ppa or something? Also, why is it not in https://projects.kde.org/projects/playg ... ls/plugins anymore?
User avatar
scummos
Global Moderator
Posts
1175
Karma
7
OS

Re: KDevelop python

Thu Dec 27, 2012 9:55 pm
Hello,

kdev-python is currently pending review and thus the path changed. I'll correct my signature in a moment, sorry.
You can get the sourcecode by git clone git://anongit.kde.org/kdev-python.

Ubuntu packages are a task for the ubuntu people and I have nothing to do with that. ;)
Some distributions reportedly already provide packages, I know for sure that OpenSuSE and Arch Linux do.

Greetings,
Sven


I'm working on the KDevelop IDE.
dummytester
Registered Member
Posts
40
Karma
0
OS

Re: KDevelop python

Tue Jan 22, 2013 12:21 am
I'm having some trouble compiling the plugin.

OK, so as I've posted this I figured out my initial problem. First problem was dependencies. Milian Wolff's website (http://milianw.de/blog/building-kdevpla ... n-from-git) has some of the dependencies I needed listed (kdelibs5-dev, kdebase-workspace-dev, and libqt4-dev). Then I had a problem with not having KDevPlatformConfig.cmake in my usr/share/kd4/apps/cmake/modules folder.

Turns out that was a dependency which was missing. However, now that I've installed it, I'm getting the following problem:
Code: Select all
CMake Warning at /usr/share/kde4/apps/cmake/modules/FindKDevPlatform.cmake:40 (find_package):
  Could not find a configuration file for package "KDevPlatform" that is
  compatible with requested version "1.5.60".

  The following configuration files were considered but not accepted:

    /usr/lib/cmake/kdevplatform/KDevPlatformConfig.cmake, version: 1.4.1

I looked at the kdevplatform packages using Muon and they don't say there's anything newer. I guess https://projects.kde.org/projects/extra ... evplatform is the true home but I don't see much to help me there. OK, it looks like I can change the CMakeLists.txt - but should I have to? I did that, onto the next issue with not having KDevelop-PG-Qt. Seems to be compiling now.

---- initial problems I figured out
I tried to the instructions in the install textfile. I also looked at http://techbase.kde.org/Projects/KDevel ... ptional.29 and tried to follow those directions, but I'm confused and they didn't seem to help. I just get the following at the "cmake .." step:
Code: Select all
-- Configuring incomplete, errors occurred!
[snipped]:~/kdev-python/build$ cmake -DCMAKE_PREFIX_PATH=/usr/bin/kdevelop -DCMAKE_INSTALL_PREFIX=/usr/bin/kdevelop ../
CMake Error at /usr/share/cmake-2.8/Modules/FindKDE4.cmake:98 (MESSAGE):
  ERROR: cmake/modules/FindKDE4Internal.cmake not found in
  /home/ben/.kde/share/apps;/usr/share/kubuntu-default-settings/kde4-profile/default/share/apps;/usr/share/kde4/apps
Call Stack (most recent call first):
  CMakeLists.txt:5 (find_package)

Also found http://flowersopenlab.weebly.com/4/post ... velop.html which says you need to add some things to the cmake file but not sure if it is necessary.
User avatar
scummos
Global Moderator
Posts
1175
Karma
7
OS

Re: KDevelop python

Tue Jan 22, 2013 12:45 am
Are you building kdev-python from git? If yes, then please use the v1.4.1 tag when compiling against kdevelop stable. To do that, type:
Code: Select all
git checkout v1.4.1

in the kdev-python source directory.

The master branch compiles only against the master branch of kdevplatform, which has not been released yet.

Greetings


I'm working on the KDevelop IDE.
dummytester
Registered Member
Posts
40
Karma
0
OS

Re: KDevelop python

Tue Jan 22, 2013 1:55 am
OK, I got errors previously but after switching to 1.4.1 it seems to have compiled successfully. But how do I get the python features to show up in kdevelop? Well it seems like the highlighting and autocompletion are working. Nevermind I think it's working; I'll review http://scummos.blogspot.de/2012/11/kdev ... eased.html closer and see how it goes.

Thanks a ton for the work! Should get a flattr account so I could conveniently give you a tip.
User avatar
scummos
Global Moderator
Posts
1175
Karma
7
OS

Re: KDevelop python

Tue Jan 22, 2013 11:57 am
Highlighting and autocompletion are the features, also quickopen support, classbrowser support, ... ;)
There's also a debugger. What else are you missing?

Cheers,
Sven


I'm working on the KDevelop IDE.
dummytester
Registered Member
Posts
40
Karma
0
OS

Re: KDevelop python

Wed Jan 23, 2013 3:22 am
Well, I'm still not getting the python plugin showing up in my Loaded Plugins list. I'm completely new to KDevelop. From the directions on your blog:
Code: Select all
In Run » Configure launches, you can select "Script Application" for a launch in the left toolview. Then, enter "python" for the interpreter, and provide a full path to your application in the "Script" line edit (note that this dialog has already been totally refactored, it's much nicer in kdevelop master. The changes have not yet been released tough).

I can't find "Script Application"?

I'm pretty familiar with Notepad++ which lets me select a language. I guess this one just automatically does it according to the file extension?
User avatar
scummos
Global Moderator
Posts
1175
Karma
7
OS

Re: KDevelop python

Thu Jan 24, 2013 10:26 am
Yes, it determines the language based on the mine type (usually the extension). If the plugin doesn't show up in the list, then it's not installed properly and you don't get any of the features.

Where did you install the python plugin? When e.g. /usr/local (replace this with the right path!) is your install path, try this:
Code: Select all
export KDEDIRS=$KDEDIRS:/usr/local
kbuildsycoca4 --noincremental
kdevelop


Greetings


I'm working on the KDevelop IDE.
dummytester
Registered Member
Posts
40
Karma
0
OS

Re: KDevelop python

Thu Jan 24, 2013 4:46 pm
Well, I did seem to get a function like enumerate to autocomplete and I seem to get decent syntax highlighting.

When you talk about the path, do you mean to include the kdev-python folder? In my case, /home/ben or /home/ben/kdev-python. Anyway, I tried both and it didn't work. I get the following errors:
Code: Select all
ben@ben-Lemur-UltraThin:~$ export KDEDIRS=$KDEDIRS:/home/ben/kdev-python
ben@ben-Lemur-UltraThin:~$ kbuildsycoca4 --noincremental
kbuildsycoca4 running...
kbuildsycoca4(4062) KConfigGroup::readXdgListEntry: List entry MimeType in "plasma-wallpaper-image.desktop" is not compliant with XDG standard (missing trailing semicolon).
kbuildsycoca4(4062) KConfigGroup::readXdgListEntry: List entry Categories in "/usr/share/applications/im-switch.desktop" is not compliant with XDG standard (missing trailing semicolon).
ben@ben-Lemur-UltraThin:~$ kdevelop
Fontconfig warning: "/etc/fonts/conf.d/50-user.conf", line 9: reading configurations from ~/.fonts.conf is deprecated.
qrc:/main.qml:23:1: QML QDeclarativeRectangle_QML_0: Binding loop detected for property "areaName"
QDeclarativeComponent(0x30e38b0)
QDeclarativeComponent(0x30e38b0)
file:///usr/lib/kde4/imports/org/kde/plasma/components/ToolButton.qml:168:5: QML Item: Possible anchor loop detected on fill.
file:///usr/lib/kde4/imports/org/kde/plasma/components/ToolButton.qml:168:5: QML Item: Possible anchor loop detected on fill.
kdevelop(4063)/kdevplatform (shell) KDevelop::SessionControllerPrivate::performRecovery: Starting recovery from  "/home/ben/.kde/share/apps/kdevelop/sessions/{44882b87-0c01-4ef6-9a07-001c4bb79404}/recovery/current"
kdevelop(4063)/konsole Konsole::Session::run: Attempted to re-run an already running session.
X Error: BadWindow (invalid Window parameter) 3
  Major opcode: 20 (X_GetProperty)
  Resource id:  0x3c00012
kdevelop(4063)/konsole Konsole::Session::run: Attempted to re-run an already running session.
X Error: BadWindow (invalid Window parameter) 3
  Major opcode: 20 (X_GetProperty)
  Resource id:  0x3c00153
X Error: BadWindow (invalid Window parameter) 3
  Major opcode: 20 (X_GetProperty)
  Resource id:  0x3c0001d
kdevelop(4063)/konsole Konsole::SessionManager::~SessionManager: Konsole SessionManager destroyed with sessions still alive
User avatar
scummos
Global Moderator
Posts
1175
Karma
7
OS

Re: KDevelop python

Thu Jan 24, 2013 6:23 pm
Please, first of all, make a screenshot of one of your python files so I can tell you whether the plugin actually works or not.

Then, did you run "make install"? You'll have to do that. If you want to install into your home folder, you could set it up like this:
Code: Select all
cd kdev-python
mkdir build
cd build
cmake .. -DCMAKE_INSTALL_PREFIX=/home/ben/install
make install
export KDEDIRS=$KDEDIRS:/home/ben/install
kbuildsycoca4
kdevelop


If you want to install it system-wide, specify another install prefix (like /usr) and run make install as root.


I'm working on the KDevelop IDE.
joshkim81
Registered Member
Posts
1
Karma
0

Re: KDevelop python

Sat Jan 26, 2013 7:48 pm
FIrst of all, thanks so much for making this plugin, it looks awesome. I've gotten it to build and show up in my KDevelop, but I can't configure the launch settings. When I go to Run -> Configure Launches, I don't see any left-pane options for a script interpreter like in the instructions on http://scummos.blogspot.com/2012/11/kdev-python-14-stable-released.html. Here's a screenshot of what I see:

Image

The instructions from the link I posted above read:

Output marks & debugging
In Run » Configure launches, you can select "Script Application" for a launch in the left toolview. Then, enter "python" for the interpreter, and provide a full path to your application in the "Script" line edit (note that this dialog has already been totally refactored, it's much nicer in kdevelop master. The changes have not yet been released tough).


Maybe I have the new kdevelop master and these steps are no longer relevant? When I go to Help -> About KDE, my KDE Platfrom version says 4.9.4, even though the Ubuntu repository I installed from says it's 4.4.1. I appreciate any help!

Thanks
User avatar
scummos
Global Moderator
Posts
1175
Karma
7
OS

Re: KDevelop python

Sun Jan 27, 2013 3:37 pm
In the left tree view, note the scrollbar at the bottom! ;)

No worries, nobody gets this one, it's totally unfindable. It's already fixed and waiting for a release.


I'm working on the KDevelop IDE.
dummytester
Registered Member
Posts
40
Karma
0
OS

Re: KDevelop python

Mon May 13, 2013 4:19 am
I'm trying to revive this. It seems that my KDE 4.5 is working fine, but I can't get the kdev-python to install. I downloaded the latest version from https://projects.kde.org/projects/extra ... repository and then I used git checkout to switch to v1.5.0. I get the following error:

Code: Select all
-- Found KDevPlatform: /home/ben/develop4/lib/cmake/kdevplatform/KDevPlatformConfig.cmake (Required is at least version "1.4.60")
CMake Error at CMakeLists.txt:7 (find_package):
  By not providing "FindKDevelop-PG-Qt.cmake" in CMAKE_MODULE_PATH this
  project has asked CMake to find a package configuration file provided by
  "KDevelop-PG-Qt", but CMake did not find one.

  Could not find a package configuration file provided by "KDevelop-PG-Qt"
  with any of the following names:

    KDevelop-PG-QtConfig.cmake
    kdevelop-pg-qt-config.cmake

  Add the installation prefix of "KDevelop-PG-Qt" to CMAKE_PREFIX_PATH or set
  "KDevelop-PG-Qt_DIR" to a directory containing one of the above files.  If
  "KDevelop-PG-Qt" provides a separate development package or SDK, be sure it
  has been installed.

-- Configuring incomplete, errors occurred!
User avatar
scummos
Global Moderator
Posts
1175
Karma
7
OS

Re: KDevelop python

Mon May 13, 2013 9:35 am
You need the kdev-pg-qt (or kdevelop-pg-qt) package, any version should work.
Maybe I should really strip this dependency by just copying the header I need ;)


I'm working on the KDevelop IDE.
dummytester
Registered Member
Posts
40
Karma
0
OS

Re: KDevelop python

Thu Jun 06, 2013 6:57 am
I finally got around to finishing this. Still running into issues.

When I tried running kbuildsycoca4, I got the following:
kbuildsycoca4 running...
kbuildsycoca4(12196) parseLayoutNode: The menu spec file contains a Layout or DefaultLayout tag without the mandatory Merge tag inside. Please fix your file.
kbuildsycoca4(12196) parseLayoutNode: The menu spec file contains a Layout or DefaultLayout tag without the mandatory Merge tag inside. Please fix your file.

What I see when I open some Python code is below. The Loaded Plugins doesn't show any plugins. Also I can't do any Launch configurations; pressing the "Add New" button doesn't do anything except depress the icon.

Image


Bookmarks



Who is online

Registered users: Bing [Bot], daret, Google [Bot], Sogou [Bot]