You need to do some hacking to get Pate installed on a (K)ubuntu 7.10 system.
Background
Pate is a really cool plugin for Kate (which is a text editor for my favorite desktop environment). It is a Kate plugin that allows you to write other Kate plugins in Python (instead of C++). It also comes with a few Python-written plugins, mainly to demonstrate what you can do with it.
I had a very hard time installing Pate. The reason being that the author is a Suse user and his configure script only works? is tailored for Suse. I'm an Ubuntu user; specifically Kubuntu 7.10 Gutsy Gibbon.
Installation Process
You need to install development headers/libraries for Kate, Sip, KDE Python bindings, QT Python bindings, etc.
sudo aptitude install cmake sip4 python-sip4-dev python-kde3-dev \ python-qt-dev kate-plugins kdelibs-dev kdebase-devIf I'm missing anything, please let me know and I'll update this.
Pate-0.5
cd PATE_SRC wget http://www.stochasticbytes.com/pate/pate-0.5-ubuntu-patches.tar.gz tar xzf pate-0.5-ubuntu-patches.tar.gz
Now configure && cd build && make && sudo make install should work as expected.
Here is a link to my Pate-0.5 patches.
Pate-0.5.1
This version isn't available (yet) via the main Pate webpage, but here's a link for you.
cd PATE_SRC wget www.stochasticbytes.com/pate/pate-0.5.1-ubuntu-patches.tar.gz tar xzf pate-0.5.1-ubuntu-patches.tar.gz
Now configure && cd build && make && sudo make install should work as expected.
Here is a link to my Pate-0.5.1 patches.
Why?
Why did I go through the trouble of making a blog post about this rather than submit my changes back to the author? Two reasons:
- It's an excuse to make a blog post!
- The author and the kwrite-devel mailing list didn't seem too interested in my plight.
15 comments:
After installing 'kdebase-dev' in addition to the packages you listed, it build and installed and Pate is now running in Kate.
Thanks!
Ahh... post updated, thank you.
I'm getting an error that says:
configure: CMake 2.4-7
configure: Kate plugin directory at /usr/share/apps/kate/plugins
configure: SIP not installed or not in the Python path (could not import sipconfig)
I do have sip4 installed via apt-get as per your post. Any ideas?
vince,
The 3 sip packages I have installed are:
sip4
python-sip4
python-sip4-dev
I'm not sure, but I think maybe a couple of them were installed by default on my system, hence why I didn't feel the need to list them in the original post.
'dpkg -L sip4-python' shows that it provides sipconfig.py, so I think that should do it for ya.
Yup, that was the missing package. Now, however I get:
configure: PyKDE not installed or not in the Python path (could not import pykdeconfig).
I thought I'd install python-kde3 and python-kde3-dev but neither package helped me get past this one. Could I be missing something else?
Actually, to edit my above post (sort of), the missing package was actually python-sip4-dev. python-sip4 had already been installed.
vince,
$ dpkg -L python-kde3 | grep pykdeconfig
/usr/share/pycentral/python-kde3/site-packages/pykdeconfig.py
Looks like dpkg says that pykdeconfig is provided by python-kde3, so I'm kind of at a loss.
How was Python installed? If it was installed by source or some other way besides apt and the official Ubuntu repositories, then you'll have to configure it to look in for pykde wherever apt installed it.
What happens if you start the Python interpreter on the command line and type 'import pykdeconfig'?
Yeah, I'm kind of at a loss too.. here's the output of dpkg -L python-kde3-dev | grep pykdeconfig
/usr/lib/python-2.4/site-packages/pykdeconfig_d.py
/usr/lib/python-2.4/site-packages/pykdeconfig_nd.py
/usr/lib/python-2.4/site-packages/pykdeconfig.py
/usr/lib/python-2.5/site-packages/pykdeconfig_nd.py
/usr/lib/python-2.5/site-packages/pykdeconfig.py
I'm not a python developer so I'm not sure how to start the python command interpreter. Can you email me at vince71 at gmail dot com? I'd really love to get your plugin working as I'm recently moved over from TextMate/Rails to Linux/Rails
Thanks!
i'm in the same situation as vince. i'm suffering the same issue with PyKDE.
it would be great if you post how you solved it.
big up
chris
well ... a dirty hack would be this ...
~# sudo apt-get source python-kde3-dev
...
~# cd cd python-kde3-*
~/python-kde3-*# sudo cp pykdeconfig.py /usr/lib/python2.5/site-packages/
kr,
Sorry, I don't have an answer. I have never used a straight up Debian system, just (K)ubuntu. Also, I don't even have a Linux machine anymore.
Hi Jan,
the mentioned file is in this folder yet.
i recognized there are 2 python versions?
python-2.4 & python-2.5. though in both site-packages/ is a file named pykdeconfig.py.
mmh. so that seems to be not the problem.
i'd really like to this plugin working. so if there is any other idea, i'd try it.
greetings
Chris
There's an error in the python-kde3-dev package. The files in /usr/lib/python-2.4/ and /usr/lib/python-2.5/ should be in /usr/lib/python2.4/ and /usr/lib/python2.5/ so you need to copy or symlink them.
Oliver, this works perfectly! Thx!
Post a Comment