[PyKDE] Designer plugin

Jim Bublitz jbublitz at nwinternet.com
Thu Oct 2 00:20:01 BST 2003


At the moment Roland's plugin is going to be hard to install if 
don't have PyKDE-3.8rc2 installed already. If you dont' have 
PyKDE-3.8rc2 installed, it's available at: 

	http://www.sourceforge.net/projects/pykde

You can copy the attached cpp and h files (but NOT the .pro 
file!) into PyKDE-3.8rc2/pythonize, overwriting what's there.
Then cd to that directory, run make, su, make install (you 
shouldn't have to rebuild PyKDE *IF* you've already built it).

Without PyKDE-3.8rc2, you'll need to futz around with the .pro 
file attached. @BL_INCLUDE_PATH@ is the path to Python.h 
(something like /usr/include/python) and @BL_LIBPYTHON@ is the 
path to libpython.a (something like /usr/lib/python/config). 
Just replace the @xxx@ symbols with the correct paths. You'll 
also need to adjust the target directory in the .pro file. Run 
qmake on the .pro file to create a make file, and make. If the 
target directory only has root write perms, you'll need to su to 
run make.

After that, you'll probably need to touch up the paths in 
Roland's .pro file, run qmake on it, and then make, etc. His 
paths that start with '$$' are into the qt directory hierarchy - 
plugins/ and interfaces/ I believe. You may need to fix some of 
his other paths/libs for your system.

The pythonize stuff that's in 3.8rc2 will probably work, but only 
for a single widget. The attached files fix that. libpythonize 
has no dependencies on PyKDE or PyQt or sip, but hasn't been 
packaged up for anything but PyKDE yet because nothing else used 
it. All libpythonize does is embeds the Python interpreter in a 
.so file and provides a simple wrapper for some Python C/API 
stuff.

It isn't as hard as it probably looks. I started writing out a 
step by step procedure, and there are a lot of steps and 'ifs' 
depending on how your system is set up. Also, I don't know if 
any of this will work on Windows - don't have a machine to test 
it on. Seems like it should.

Obviously, this needs an install procedure someday.

Jim
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pythonize.cpp
Type: text/x-c++src
Size: 6936 bytes
Desc: not available
Url : http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20031002/44d91dd0/pythonize.bin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pythonize.h
Type: text/x-chdr
Size: 5068 bytes
Desc: not available
Url : http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20031002/44d91dd0/pythonize-0001.bin
-------------- next part --------------
#
#     Copyright 2003 Jim Bublitz <jbublitz at nwinternet.com>

TEMPLATE = lib
TARGET = pythonize
DESTDIR = ../libs
CONFIG = dll warn_off
INCLUDEPATH += @BL_INCLUDEPATH@ .
DEFINES =
QMAKE_LFLAGS_SHLIB += -Xlinker -export-dynamic -Wl,-E
unix:LIBS +=  -L @BL_LIBPYTHON@ -lutil -lpthread -ldl
SOURCES = pythonize.cpp
HEADERS = \
        pythonize.h


More information about the PyQt mailing list