[PyKDE] 64-bit issue in PyKDE's configure.py (patch included)

Jim Bublitz jbublitz at nwinternet.com
Fri May 28 18:32:01 BST 2004

On Friday 28 May 2004 06:57, Joachim Werner wrote:
> Hi!
> I've found a typo in the PyKDE configure.py script that causes the "-d"
> option to be ignored. See the patch.

Fixed for the next release.

> This caused trouble with 64-bit systems. But actually I think the best
> solution would be to make sure that the configuration scripts find out
> about the correct Python paths automatically.

> Currently our RPM specfile passes the result of
> python -c 'import site; print site.sitedirs[0];'
> as the "-d" parameter. This seems odd to me because site.sitedirs[0]
> could as well be called from inside the configuration scripts ...

This is the current "flow" for specifying the default installation path:

    import sipconfig
    print ("Can't find sipconfig.py (expected in sys.path)")
    print ("Have you built the correct version of sip?")
    sys.exit (-1)


sipcfg            = sipconfig.Configuration()


opt_pykdemoddir   = sipcfg.default_mod_dir

It allows the user to install sip/PyQt someplace other than site-dirs (which 
apparently some people want to do) and automatically direct the PyKDE modules 
to the same directory (if it's in sys.path). That's probably why there's only 
been one other report of the -d bug even though in the past a  lot of people 
have requested that option.

I believe rpm allows you to patch sources before compiling, so you could patch 
the opt_pykdemoddir definition if the -d switch (now that it works) is a 

Your rpms should install [sip, pyqt, pykde]config.py in the installation 
directory also. That makes writing configure.py a lot easier for any 
downstream developers who use sip or import PyQt or PyKDE modules.


More information about the PyQt mailing list