[review] [PyKDE] PyKDE Trouble

Jim Bublitz jbublitz at nwinternet.com
Mon Dec 1 18:41:01 GMT 2003


On Sunday November 30 2003 16:15, Justin Bonnar wrote:
> Hi,
>
> I'm trying to setup PyKDE 3.8 on my SuSE 9.0 machine.  I ran
> into some difficulties in the meantime though.  I am using the
> SuSE RPMs that came with the distrobution for PyQT and
> PyQT-devel as well as sip (all are 3.8.)  I found the note
> about SuSE 8.2/9.0 using an incorrect version of kfileshare.h
> and looking at the kfileshare.sip in the sip directory of the
> PyKDE package it looks like all of the setShared calls are
> already commented out (I've attached it though just in case.)
>
> I ran the python build output to a text file and have attached
> it to the email as well (it's called output.txt.)

There is an error in the build system both in how it computes 
where the PyQt sip files should be, and also in the '-v' command 
line option which lets you specify where they are.

Here's PyKDE-3.8.0/build/discover.py as shipped, starting at line 
613:

---------------------------------------------
def discoverPyQt (self, opts):
        """
        -v dir         the directory containing the PyQt sip  
        files
        """
        self.pyQtLib = DiscoverPyQtLib ("libqtcmodule*",\
                             [self.sipLib.path])

        if opts.has_key ("-v"):
            pyQtSipPath = [opts ["-v"]]
        else:
            pyQtSipPath = ["../", "/usr/local/",\
                                 "/usr/local/src/", "/usr/src/",\
                                 "/usr/share/sip",\
                                 "/usr/local/share/sip",\
                                 "/usr/share/sip/qt"]
        self.pyQtSip = DiscoverPyQtSip (os.path.join \
                             ("PyQt-x11-gpl-" +
                               self.pyQtLib.vers, "sip",\      
                               "qtmod.sip"), pyQtSipPath)
        print
---------------------------------------------

change it to:

---------------------------------------------
def discoverPyQt (self, opts):
        """
        -v dir         the directory containing the PyQt sip  
        files
        """
        self.pyQtLib = DiscoverPyQtLib ("libqtcmodule*",\
                             [self.sipLib.path])

        if opts.has_key ("-v"):
            pyQtSipPath = [opts ["-v"]]
            # add this line: 
	    # ~~~~~~~~~~~~~~~
            self.pyQtSip = DiscoverPyQtSip ("qtmod.sip",\  
                                  pyQtSipPath)
                                 
        else:
            pyQtSipPath = ["../", "/usr/local/",\
                                 "/usr/local/src/", "/usr/src/",\
                                 "/usr/share/sip",\
                                 "/usr/local/share/sip",\
                                 "/usr/share/sip/qt"]
        # indent the following line so it's part of the 'else'
        # ~~~~~~~~~~~~~~~
            self.pyQtSip = DiscoverPyQtSip (os.path.join \
                             ("PyQt-x11-gpl-" +
                               self.pyQtLib.vers, "sip",\      
                               "qtmod.sip"), pyQtSipPath)
        print
---------------------------------------------


Then run 

    python build.py -v /usr/share/sip/qt

which should be the path if you installed PyQt from the SuSE rpm.

ALSO: In PyKDE-3.8.0/pythonize/test/testPythonize.pro and 
PyKDE-3.8.0/pykpanelapplet/pytkpanelapplet.pro change 
'python2.2' to 'python2.3'.

Otherwise, PyKDE-3.8.1 should be released in a few days and 
should have fixes for both of the problems above (the only 
changes in the release will be build system fixes).

Jim




More information about the PyQt mailing list